DEV: Replace deprecated min_trust_to_create_post (#356)

In https://github.com/discourse/discourse/pull/24740, `min_trust_to_create_topic` site setting was replaced by `create_topic_allowed_groups`. This PR replaces the former, deprecated one, with the latter.
This commit is contained in:
Krzysztof Kotlarek 2023-12-14 14:07:28 +11:00 committed by GitHub
parent 64587967c9
commit 6de9b9c274
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View File

@ -3,7 +3,7 @@
require "rails_helper"
describe DiscourseAi::Embeddings::EntryPoint do
fab!(:user) { Fabricate(:user) }
fab!(:user) { Fabricate(:user, refresh_auto_groups: true) }
describe "registering event callbacks" do
context "when creating a topic" do

View File

@ -3,7 +3,7 @@
require "rails_helper"
describe DiscourseAi::Nsfw::EntryPoint do
fab!(:user) { Fabricate(:user) }
fab!(:user) { Fabricate(:user, refresh_auto_groups: true) }
describe "registering event callbacks" do
fab!(:image_upload) { Fabricate(:upload) }

View File

@ -3,7 +3,7 @@
require_relative "../../../support/sentiment_inference_stubs"
RSpec.describe DiscourseAi::Sentiment::EntryPoint do
fab!(:user) { Fabricate(:user) }
fab!(:user) { Fabricate(:user, refresh_auto_groups: true) }
describe "registering event callbacks" do
context "when creating a post" do

View File

@ -3,7 +3,7 @@
require "rails_helper"
describe DiscourseAi::Toxicity::EntryPoint do
fab!(:user) { Fabricate(:user) }
fab!(:user) { Fabricate(:user, refresh_auto_groups: true) }
describe "registering event callbacks" do
before { SiteSetting.ai_toxicity_enabled = true }