FIX: better error message when topic deletion fails

This commit is contained in:
Arpit Jalan
2020-01-15 19:11:41 +05:30
parent ff93c4b2f4
commit 0f8695958b
3 changed files with 4 additions and 1 deletions

View File

@@ -860,7 +860,7 @@ RSpec.describe TopicsController do
it "raises an exception when the user doesn't have permission to delete the topic" do
sign_in(user)
delete "/t/#{topic.id}.json"
expect(response).to be_forbidden
expect(response.status).to eq(422)
end
end