mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Convert min_trust_to_flag_posts setting to groups (#24864)
We're changing the implementation of trust levels to use groups. Part of this is to have site settings that reference trust levels use groups instead. It converts the min_trust_to_flag_posts site setting to flag_post_allowed_groups. Note: In the original setting, "posts" is plural. I have changed this to "post" singular in the new setting to match others.
This commit is contained in:
@@ -6,7 +6,7 @@ RSpec.describe Jobs::AutoQueueHandler do
|
||||
describe "old flagged post" do
|
||||
fab!(:spam_result) do
|
||||
PostActionCreator.new(
|
||||
Fabricate(:user),
|
||||
Fabricate(:user, refresh_auto_groups: true),
|
||||
Fabricate(:post),
|
||||
PostActionType.types[:spam],
|
||||
message: "this is the initial message",
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
require "csv"
|
||||
|
||||
RSpec.describe Jobs::ExportUserArchive do
|
||||
fab!(:user) { Fabricate(:user, username: "john_doe") }
|
||||
fab!(:user) { Fabricate(:user, username: "john_doe", refresh_auto_groups: true) }
|
||||
fab!(:user2) { Fabricate(:user) }
|
||||
let(:extra) { {} }
|
||||
let(:job) do
|
||||
|
||||
@@ -5,7 +5,7 @@ RSpec.describe Jobs::PendingReviewablesReminder do
|
||||
|
||||
def create_flag(created_at)
|
||||
PostActionCreator.create(
|
||||
Fabricate(:user),
|
||||
Fabricate(:user, refresh_auto_groups: true),
|
||||
Fabricate(:post),
|
||||
:spam,
|
||||
created_at: created_at,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
RSpec.describe Jobs::TruncateUserFlagStats do
|
||||
fab!(:user)
|
||||
fab!(:other_user) { Fabricate(:user) }
|
||||
fab!(:user) { Fabricate(:user, refresh_auto_groups: true) }
|
||||
fab!(:other_user) { Fabricate(:user, refresh_auto_groups: true) }
|
||||
|
||||
before do
|
||||
# We might make this a site setting eventually
|
||||
|
||||
Reference in New Issue
Block a user