mirror of
https://github.com/discourse/discourse.git
synced 2025-02-22 04:07:27 +00:00
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…
x
Reference in New Issue
Block a user