|
369 | 369 | expect(remote_resource.info).to eq(RemoteResourceInfo.dummy_record) |
370 | 370 | end |
371 | 371 | end |
372 | | - describe "#send_command_clean_cache" do |
373 | | - let(:userfile_list) { [1,2,3] } |
374 | | - let(:older_than) { 1 } |
375 | | - let(:younger_than) { 2 } |
376 | | - let(:types) { [ "TextFile" ] } |
377 | | - before(:each) do |
378 | | - allow(RemoteCommand).to receive(:new) |
379 | | - allow(remote_resource).to receive(:send_command) |
380 | | - end |
381 | | - it "should raise an exception if older_than is not a number or time" do |
382 | | - expect{ remote_resource.send_command_clean_cache(nil, userfile_list, types, nil, younger_than) }.to raise_error(CbrainError) |
383 | | - end |
384 | | - it "should raise an exception if younger_than is not a number or time" do |
385 | | - expect{ remote_resource.send_command_clean_cache(nil, userfile_list, types, older_than, nil) }.to raise_error(CbrainError) |
386 | | - end |
387 | | - it "should create a new clean_cache RemoteCommand" do |
388 | | - expect(RemoteCommand).to receive(:new).with hash_including(:command => "clean_cache") |
389 | | - remote_resource.send_command_clean_cache(nil, userfile_list, types, older_than, younger_than) |
390 | | - end |
391 | | - it "should send the command" do |
392 | | - expect(remote_resource).to receive(:send_command) |
393 | | - remote_resource.send_command_clean_cache(nil, userfile_list, types, older_than, younger_than) |
394 | | - end |
395 | | - end |
396 | 372 | describe "#send_command_start_workers" do |
397 | 373 | it "should create a new start_workers RemoteCommand" do |
398 | 374 | allow(remote_resource).to receive(:send_command) |
|
0 commit comments