mirror of
https://github.com/discourse/discourse.git
synced 2025-06-01 04:19:01 +08:00
DEV: Use proper wording for contexts in specs
This commit is contained in:

committed by
Loïc Guitaut

parent
02987e05d5
commit
3eaac56797
@ -8,7 +8,7 @@ RSpec.describe BadgesController do
|
||||
SiteSetting.enable_badges = true
|
||||
end
|
||||
|
||||
context 'index' do
|
||||
describe '#index' do
|
||||
it 'should return a list of all badges' do
|
||||
get "/badges.json"
|
||||
|
||||
@ -19,7 +19,7 @@ RSpec.describe BadgesController do
|
||||
end
|
||||
end
|
||||
|
||||
context 'show' do
|
||||
describe '#show' do
|
||||
it "should return a badge" do
|
||||
get "/badges/#{badge.id}.json"
|
||||
expect(response.status).to eq(200)
|
||||
@ -42,7 +42,7 @@ RSpec.describe BadgesController do
|
||||
end
|
||||
end
|
||||
|
||||
context "user profiles" do
|
||||
describe "user profiles" do
|
||||
let(:titled_badge) { Fabricate(:badge, name: 'Protector of the Realm', allow_title: true) }
|
||||
let!(:grant) { UserBadge.create!(user_id: user.id, badge_id: titled_badge.id, granted_at: 1.minute.ago, granted_by_id: -1) }
|
||||
|
||||
|
Reference in New Issue
Block a user