DEV: Specify slug name during Category fabrication
This commit is contained in:
parent
19a0bdc0ee
commit
c46cd1bd04
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
Fabricator(:category) do
|
Fabricator(:category) do
|
||||||
name { sequence(:name) { |n| "Amazing Category #{n}" } }
|
name { sequence(:name) { |n| "Amazing Category #{n}" } }
|
||||||
slug { sequence(:slug) { |n| "amazing-category-#{n}" } }
|
|
||||||
skip_category_definition true
|
skip_category_definition true
|
||||||
user
|
user
|
||||||
end
|
end
|
||||||
|
|
|
@ -15,7 +15,7 @@ RSpec.describe ReviewableScoreSerializer do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'adds a link for category settings' do
|
it 'adds a link for category settings' do
|
||||||
category = Fabricate.build(:category)
|
category = Fabricate(:category, name: 'Reviewable Category', slug: 'reviewable-category')
|
||||||
reviewable.category = category
|
reviewable.category = category
|
||||||
serialized = serialized_score('category')
|
serialized = serialized_score('category')
|
||||||
link_url = "#{Discourse.base_url}/c/#{category.slug}/edit/settings"
|
link_url = "#{Discourse.base_url}/c/#{category.slug}/edit/settings"
|
||||||
|
|
Loading…
Reference in New Issue