DEV: removing create post for category and tag changes setting (#210)

This commit is contained in:
Gabriel Grubba 2024-08-13 17:28:29 -03:00 committed by GitHub
parent 57b460737c
commit 35925c4dac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 0 additions and 32 deletions

View File

@ -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]) }