Implement API playlists/destroy

This commit is contained in:
Thibault Jouan
2015-05-03 23:35:53 +00:00
parent d03007c99f
commit 689fe2f4dd
3 changed files with 14 additions and 2 deletions

View File

@@ -44,4 +44,11 @@ describe 'API playlists' do
name: 'new name'
)
end
it 'destroys a playlist' do
playlist = create :playlist
expect { delete api_playlist_path(playlist), format: :json }
.to change { get api_playlist_path playlist, format: :json }
.from(200).to 404
end
end