spec/sabnzbd_spec.rb in sabnzbd-0.1.1 vs spec/sabnzbd_spec.rb in sabnzbd-0.2.0

- old
+ new

@@ -36,11 +36,11 @@ before do VCR.insert_cassette 'invalid key' end it "should raise an error" do - expect {sabnzbd.simple_queue}.to raise_error(ApiKeyInvalid) + expect {sabnzbd.advanced_queue}.to raise_error(ApiKeyInvalid) end after do VCR.eject_cassette end @@ -63,18 +63,18 @@ after do VCR.eject_cassette end end - describe "GET simple Queue output" do + describe "GET advanced Queue output" do let(:sabnzbd) {Sabnzbd.new({base_uri: Base_uri, api_key: "valid_key"})} before do - VCR.insert_cassette 'simple queue', :record => :new_episodes + VCR.insert_cassette 'advanced queue', :record => :new_episodes end - it "should get the simple queue" do - sabnzbd.simple_queue.should be_an_instance_of(Hash) + it "should get the advanced queue" do + sabnzbd.advanced_queue.should be_an_instance_of(Hash) end after do VCR.eject_cassette end @@ -86,10 +86,22 @@ VCR.insert_cassette 'slots', :record => :new_episodes end it "should have 1 slot that is downloading a_big_legal_file" do sabnzbd.slots.first.filename.should == "a_big_legal_file" - end + end + + it "should be queued" do + sabnzbd.slots.first.status.should == "Queued" + end + + it "should have a speed of 0" do + sabnzbd.speed.should == "0" + end + + it "should have a position of 0" do + sabnzbd.slots.first.position.should == 0 + end after do VCR.eject_cassette end end \ No newline at end of file