Remove controllers spec already tested elsewhere

This commit is contained in:
Thibault Jouan
2015-05-01 14:11:11 +00:00
parent 5e1757aff9
commit 896fe661bd
15 changed files with 64 additions and 478 deletions

View File

@@ -4,21 +4,20 @@ describe 'API tracks' do
before { api_sign_in }
it 'lists tracks' do
track_1 = FactoryGirl.create(:track_with_sound, name: 'Track 1')
track_2 = FactoryGirl.create(:track, name: 'Track 2')
track_1 = create :track_with_sound, name: 'Track 1'
track_2 = create :track, name: 'Track 2'
get api_tracks_path, format: :json
expect(response.body).to eq [
expect(json).to eq [
{
id: track_1.id,
name: 'Track 1',
sound_url: api_sound_url(track_1.sound)
id: track_1.id,
name: 'Track 1',
sound_url: api_sound_url(track_1.sound)
},
{
id: track_2.id,
name: 'Track 2'
id: track_2.id,
name: 'Track 2'
}
].to_json
]
end
end