From 35925c4dac08638ecba1da588310719c7983763d Mon Sep 17 00:00:00 2001 From: Gabriel Grubba <70247653+Grubba27@users.noreply.github.com> Date: Tue, 13 Aug 2024 17:28:29 -0300 Subject: [PATCH] DEV: removing create post for category and tag changes setting (#210) --- spec/services/manager_spec.rb | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/spec/services/manager_spec.rb b/spec/services/manager_spec.rb index 3143677..c749cd9 100644 --- a/spec/services/manager_spec.rb +++ b/spec/services/manager_spec.rb @@ -316,38 +316,6 @@ RSpec.describe DiscourseChatIntegration::Manager do expect(provider.sent_to_channel_ids).to contain_exactly(chan1.id) end - describe "With `create_post_for_category_and_tag_changes` enabled" do - before(:each) { SiteSetting.create_post_for_category_and_tag_changes = true } - - let(:admin) { Fabricate(:admin) } - let(:other_topic) { Fabricate(:topic) } - let(:other_topic_post) { Fabricate(:post, topic: topic) } - - it "should trigger follow rules for specific categories when topic category changes" do - DiscourseChatIntegration::Rule.create!( - channel: chan1, - filter: "follow", - category_id: category.id, - ) - - PostRevisor.new(other_topic_post).revise!(admin, category_id: category.id) - - manager.trigger_notifications(topic.ordered_posts.last.id) - - expect(provider.sent_to_channel_ids).to contain_exactly(chan1.id) - end - - it "shouldn't trigger follow rules with wildcard category match" do - DiscourseChatIntegration::Rule.create!(channel: chan1, filter: "follow", category_id: nil) - - PostRevisor.new(other_topic_post).revise!(admin, category_id: category.id) - - manager.trigger_notifications(topic.ordered_posts.last.id) - - expect(provider.sent_to_channel_ids).to contain_exactly - end - end - describe "with tags enabled" do let(:tag) { Fabricate(:tag, name: "gsoc") } let(:tagged_topic) { Fabricate(:topic, category_id: category.id, tags: [tag]) }