Fix coding standards in specs
This commit is contained in:
parent
342f9c5aa4
commit
79c4aef669
@ -6,7 +6,6 @@ describe 'API playlists' do
|
||||
it 'lists playlists' do
|
||||
playlist = create :playlist
|
||||
get api_playlists_path, format: :json
|
||||
|
||||
expect(json).to eq(
|
||||
playlists: [{
|
||||
id: playlist.id,
|
||||
@ -18,7 +17,6 @@ describe 'API playlists' do
|
||||
it 'shows a playlist' do
|
||||
playlist = create :playlist
|
||||
get api_playlist_path playlist, format: :json
|
||||
|
||||
expect(json).to eq(
|
||||
playlist: {
|
||||
id: playlist.id,
|
||||
@ -30,7 +28,6 @@ describe 'API playlists' do
|
||||
it 'creates playlist' do
|
||||
playlist = attributes_for :playlist
|
||||
post api_playlists_path, format: :json, playlist: playlist
|
||||
|
||||
expect(json).to match(
|
||||
playlist: {
|
||||
id: an_instance_of(Fixnum),
|
||||
|
@ -12,7 +12,6 @@ describe 'API sign in' do
|
||||
|
||||
it 'signs the user in with valid credentials' do
|
||||
do_create
|
||||
|
||||
expect(json).to eq(user: { id: user.id })
|
||||
end
|
||||
|
||||
@ -21,7 +20,6 @@ describe 'API sign in' do
|
||||
it 'rejects authentication' do
|
||||
allow(user).to receive(attr).and_return(user.send(attr) + '_INVALID')
|
||||
do_create
|
||||
|
||||
expect(response).to be_not_found
|
||||
expect(response.body).to be_empty
|
||||
end
|
||||
|
@ -7,7 +7,6 @@ describe 'API tracks' do
|
||||
track_1 = create :track_with_sound, name: 'Track 1'
|
||||
track_2 = create :track, name: 'Track 2'
|
||||
get api_tracks_path, format: :json
|
||||
|
||||
expect(json).to eq(
|
||||
tracks: [
|
||||
{
|
||||
@ -26,7 +25,6 @@ describe 'API tracks' do
|
||||
it 'shows a track' do
|
||||
track = create :track
|
||||
get api_track_path track, format: :json
|
||||
|
||||
expect(json).to eq(
|
||||
track: {
|
||||
id: track.id,
|
||||
|
Loading…
x
Reference in New Issue
Block a user