mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 21:51:13 +08:00
FEATURE: Allow multiple required tag groups for a category (#16381)
Previously we only supported a single 'required tag group' for a category. This commit allows admins to specify multiple required tag groups, each with their own minimum tag count. A new category_required_tag_groups database table replaces the existing columns on the categories table. Data is automatically migrated.
This commit is contained in:
@ -159,7 +159,7 @@ describe TopicCreator do
|
||||
|
||||
context 'required tag group' do
|
||||
fab!(:tag_group) { Fabricate(:tag_group, tags: [tag1]) }
|
||||
fab!(:category) { Fabricate(:category, name: "beta", required_tag_group: tag_group, min_tags_from_required_group: 1) }
|
||||
fab!(:category) { Fabricate(:category, name: "beta", category_required_tag_groups: [CategoryRequiredTagGroup.new(tag_group: tag_group, min_count: 1)]) }
|
||||
|
||||
it "when no tags are not present" do
|
||||
expect(
|
||||
|
Reference in New Issue
Block a user