Return 422 when API playlists cannot be saved

This commit is contained in:
Thibault Jouan
2015-05-04 00:59:00 +00:00
parent dcfe1b1b79
commit 8f8cdaec79
2 changed files with 13 additions and 2 deletions

View File

@@ -40,6 +40,14 @@ describe 'API playlists' do
}
)
end
context 'when playlist is invalid' do
let(:playlist) { attributes_for :playlist, name: '' }
it 'responds with unprocessable entity status' do
expect(response).to have_http_status 422
end
end
end
it 'updates a playlist' do