diff --git a/app/assets/javascripts/discourse/app/templates/group/manage/tags.hbs b/app/assets/javascripts/discourse/app/templates/group/manage/tags.hbs index caebf64bd86..5635b458422 100644 --- a/app/assets/javascripts/discourse/app/templates/group/manage/tags.hbs +++ b/app/assets/javascripts/discourse/app/templates/group/manage/tags.hbs @@ -19,7 +19,7 @@ 0 end changed diff --git a/spec/models/group_spec.rb b/spec/models/group_spec.rb index fafaf1b328c..27fd72e427d 100644 --- a/spec/models/group_spec.rb +++ b/spec/models/group_spec.rb @@ -1380,6 +1380,24 @@ RSpec.describe Group do expect(GroupTagNotificationDefault.lookup(group, :watching)).to be_empty end + it "can change the notification level for a tag" do + GroupTagNotificationDefault.create!( + group: group, + tag: tag1, + notification_level: GroupTagNotificationDefault.notification_levels[:watching], + ) + + group.watching_tags = [tag1.name] + group.save! + expect(GroupTagNotificationDefault.lookup(group, :watching).pluck(:tag_id)).to eq([tag1.id]) + + group.watching_tags = [] + group.tracking_tags = [tag1.name] + group.save! + expect(GroupTagNotificationDefault.lookup(group, :watching)).to be_empty + expect(GroupTagNotificationDefault.lookup(group, :tracking).pluck(:tag_id)).to eq([tag1.id]) + end + it "can apply default notifications for admins group" do group = Group.find(Group::AUTO_GROUPS[:admins]) group.tracking_category_ids = [category1.id]