FIX: don't bump topics when hidden tags are added or removed

This commit is contained in:
Neil Lalonde
2019-05-06 14:51:51 -04:00
parent 39260c841e
commit 5de750d373
3 changed files with 52 additions and 1 deletions

View File

@@ -110,6 +110,16 @@ module Helpers
end
end
def create_hidden_tags(tag_names)
tag_group = Fabricate(:tag_group,
name: 'Hidden Tags',
permissions: { staff: :full }
)
tag_names.each do |name|
tag_group.tags << (Tag.where(name: name).first || Fabricate(:tag, name: name))
end
end
def capture_stdout
old_stdout = $stdout
io = StringIO.new