DEV: Specify slug name during Category fabrication

This commit is contained in:
Jamie Wilson 2023-01-05 18:05:17 -05:00 committed by Alan Guo Xiang Tan
parent 19a0bdc0ee
commit c46cd1bd04
2 changed files with 1 additions and 2 deletions

View File

@ -2,7 +2,6 @@
Fabricator(:category) do
name { sequence(:name) { |n| "Amazing Category #{n}" } }
slug { sequence(:slug) { |n| "amazing-category-#{n}" } }
skip_category_definition true
user
end

View File

@ -15,7 +15,7 @@ RSpec.describe ReviewableScoreSerializer do
end
it 'adds a link for category settings' do
category = Fabricate.build(:category)
category = Fabricate(:category, name: 'Reviewable Category', slug: 'reviewable-category')
reviewable.category = category
serialized = serialized_score('category')
link_url = "#{Discourse.base_url}/c/#{category.slug}/edit/settings"