DEV: Replace deprecated min_trust_to_create_post (#505)

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:37:41 +11:00 committed by GitHub
parent b55e394ba8
commit d873057af6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -11,7 +11,7 @@ describe Post do
SiteSetting.discourse_post_event_enabled = true
end
let(:user) { Fabricate(:user, admin: true) }
let(:user) { Fabricate(:user, admin: true, refresh_auto_groups: true) }
context "with a public event" do
let(:post_1) { Fabricate(:post) }
@ -304,7 +304,7 @@ describe Post do
end
context "when the acting user has rights to create events" do
let(:user_with_rights) { Fabricate(:user) }
let(:user_with_rights) { Fabricate(:user, refresh_auto_groups: true) }
let(:group) { Fabricate(:group, users: [user_with_rights]) }
before { SiteSetting.discourse_post_event_allowed_on_groups = group.id.to_s }
@ -326,7 +326,7 @@ describe Post do
end
context "when the acting user doesnt have rights to create events" do
let(:user_without_rights) { Fabricate(:user) }
let(:user_without_rights) { Fabricate(:user, refresh_auto_groups: true) }
let(:group) { Fabricate(:group, users: [user]) }
before { SiteSetting.discourse_post_event_allowed_on_groups = group.id.to_s }

View File

@ -12,7 +12,7 @@ describe Topic do
SiteSetting.discourse_post_event_enabled = true
end
let(:user) { Fabricate(:user) }
let(:user) { Fabricate(:user, refresh_auto_groups: true) }
context "when a topic is created" do
context "with a date in title" do