spec/collection_spec.rb in vj-sdk-0.5.3 vs spec/collection_spec.rb in vj-sdk-0.5.4

- old
+ new

@@ -25,9 +25,14 @@ it "reports page 1 when tested with a zero offset" do c = Videojuicer::Resource::Collection.new(@objects[0..9], 155, 0, 10) c.page_number.should == 1 end + it "reports page 1 when there are zero items" do + c = Videojuicer::Resource::Collection.new(@objects[0..9], 0, 0, 10) + c.page_number.should == 1 + end + it "pagination copes with a nil limit" do collection = Videojuicer::Resource::Collection.new(@objects[0..9], 155, 17, nil) collection.page_count.should == 1 collection.page_number.should == 1 end \ No newline at end of file