Skip to content

Commit e4c3773

Browse files
committed
Adjustments to unit tests for previous commmit
1 parent d1c6d8a commit e4c3773

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

BrainPortal/spec/models/remote_resource_spec.rb

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -369,30 +369,6 @@
369369
expect(remote_resource.info).to eq(RemoteResourceInfo.dummy_record)
370370
end
371371
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
396372
describe "#send_command_start_workers" do
397373
it "should create a new start_workers RemoteCommand" do
398374
allow(remote_resource).to receive(:send_command)

0 commit comments

Comments
 (0)