mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
FIX: ensures global notices are destroyed on post created (#28684)
Prior to this fix we could exit early if tags was `[]` as `tags && (tags & post.topic.tags.map(&:name)).empty?` would have returned true. This commit ensures it's not the case anymore and adds a test for it. Co-Authored-By: Martin Brennan <mjrbrennan@gmail.com>
This commit is contained in:
@ -0,0 +1,8 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
Fabricator(:user_global_notice, from: DiscourseAutomation::UserGlobalNotice) do
|
||||
user_id { Fabricate(:user).id }
|
||||
notice "This is an important notice"
|
||||
level "info"
|
||||
identifier "foo"
|
||||
end
|
Reference in New Issue
Block a user