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

committed by
Loïc Guitaut

parent
02987e05d5
commit
3eaac56797
@ -30,7 +30,7 @@ RSpec.describe Category do
|
||||
expect(cats.errors[:name]).to be_present
|
||||
end
|
||||
|
||||
context 'associations' do
|
||||
describe 'Associations' do
|
||||
it 'should delete associated sidebar_section_links when category is destroyed' do
|
||||
category_sidebar_section_link = Fabricate(:category_sidebar_section_link)
|
||||
category_sidebar_section_link_2 = Fabricate(:category_sidebar_section_link, linkable: category_sidebar_section_link.linkable)
|
||||
@ -289,7 +289,7 @@ RSpec.describe Category do
|
||||
end
|
||||
|
||||
describe 'non-english characters' do
|
||||
context 'uses ascii slug generator' do
|
||||
context 'when using ascii slug generator' do
|
||||
before do
|
||||
SiteSetting.slug_generation_method = 'ascii'
|
||||
@category = Fabricate(:category_with_definition, name: "测试")
|
||||
@ -302,7 +302,7 @@ RSpec.describe Category do
|
||||
end
|
||||
end
|
||||
|
||||
context 'uses none slug generator' do
|
||||
context 'when using none slug generator' do
|
||||
before do
|
||||
SiteSetting.slug_generation_method = 'none'
|
||||
@category = Fabricate(:category_with_definition, name: "测试")
|
||||
@ -318,7 +318,7 @@ RSpec.describe Category do
|
||||
end
|
||||
end
|
||||
|
||||
context 'uses encoded slug generator' do
|
||||
context 'when using encoded slug generator' do
|
||||
before do
|
||||
SiteSetting.slug_generation_method = 'encoded'
|
||||
@category = Fabricate(:category_with_definition, name: "测试")
|
||||
|
Reference in New Issue
Block a user