spec/serializable/paging_spec.rb in restpack_serializer-0.2.3 vs spec/serializable/paging_spec.rb in restpack_serializer-0.2.4
- old
+ new
@@ -23,12 +23,12 @@
page[:meta][:songs][:previous_page].should == nil
page[:meta][:songs][:next_page].should == 2
end
it "includes links" do
page[:links].should == {
- 'songs.albums' => { :href => "/albums/{songs.album}.json", :type => :albums },
- 'songs.artists' => { :href => "/artists/{songs.artist}.json", :type => :artists }
+ 'songs.album' => { :href => "/albums/{songs.album}.json", :type => :albums },
+ 'songs.artist' => { :href => "/artists/{songs.artist}.json", :type => :artists }
}
end
end
context "with custom page size" do
@@ -91,13 +91,13 @@
page[:albums].should_not == nil
page[:artists].should_not == nil
end
it "includes links" do
- page[:links]['songs.albums'].should_not == nil
- page[:links]['songs.artists'].should_not == nil
+ page[:links]['songs.album'].should_not == nil
+ page[:links]['songs.artist'].should_not == nil
page[:links]['albums.songs'].should_not == nil
- page[:links]['albums.artists'].should_not == nil
+ page[:links]['albums.artist'].should_not == nil
page[:links]['artists.songs'].should_not == nil
page[:links]['artists.albums'].should_not == nil
end
end
end