mirror of
https://github.com/discourse/discourse.git
synced 2025-05-25 09:57:25 +08:00
FEATURE: Add user to topic_tags_changed event (#28714)
* FEATURE: Add user to topic_tags_changed event Add user to topic_tags_changed event context Update automation plugin with new arguments in event Update tests for new arguments relates to https://github.com/discourse/discourse-chat-integration/pull/214 * DEV: change variable name for better readability changed `tags` to be payload and used `values_at` to get the values of the keys
This commit is contained in:
@ -55,6 +55,7 @@ describe DiscourseAutomation::Triggers::TOPIC_TAGS_CHANGED do
|
||||
|
||||
expect(list.length).to eq(1)
|
||||
expect(list[0]["kind"]).to eq(DiscourseAutomation::Triggers::TOPIC_TAGS_CHANGED)
|
||||
expect(list[0]["user"]).to eq(user)
|
||||
end
|
||||
|
||||
it "should fire the trigger if the tag is removed" do
|
||||
@ -65,6 +66,7 @@ describe DiscourseAutomation::Triggers::TOPIC_TAGS_CHANGED do
|
||||
|
||||
expect(list.length).to eq(1)
|
||||
expect(list[0]["kind"]).to eq(DiscourseAutomation::Triggers::TOPIC_TAGS_CHANGED)
|
||||
expect(list[0]["user"]).to eq(user)
|
||||
end
|
||||
|
||||
it "should not fire if the tag is not present" do
|
||||
|
Reference in New Issue
Block a user