spec/serializable/resource_spec.rb in restpack_serializer-0.4.3 vs spec/serializable/resource_spec.rb in restpack_serializer-0.4.4
- old
+ new
@@ -5,18 +5,18 @@
@album = FactoryGirl.create(:album_with_songs, song_count: 11)
@song = @album.songs.first
end
let(:resource) { MyApp::SongSerializer.resource(params) }
- let(:params) { { id: @song.id.to_s } }
+ let(:params) { { id: @song.id } }
it "returns a resource by id" do
resource[:songs].count.should == 1
resource[:songs][0][:id].should == @song.id.to_s
end
describe "side-loading" do
- let(:params) { { id: @song.id.to_s, includes: 'albums' } }
+ let(:params) { { id: @song.id, includes: 'albums' } }
it "includes side-loaded models" do
resource[:albums].count.should == 1
resource[:albums].first[:id].should == @song.album.id.to_s
end