Improve specs to test for the right response status.
This commit is contained in:
parent
407d80f1dd
commit
82222e8d18
|
@ -22,7 +22,7 @@ describe UserBadgesController do
|
|||
it "fails when badges are disabled" do
|
||||
SiteSetting.enable_badges = false
|
||||
get :index, params: { badge_id: badge.id }, format: :json
|
||||
expect(response).not_to be_success
|
||||
expect(response.status).to eq(404)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ RSpec.describe UsersController do
|
|||
it "fails if badges are disabled" do
|
||||
SiteSetting.enable_badges = false
|
||||
get "/u/#{user.username}/badges"
|
||||
expect(response).not_to be_success
|
||||
expect(response.status).to eq(404)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue