mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: move post flags into database (#26951)
This is preparation for a feature that will allow admins to define their custom flags. Current behaviour should stay untouched.
This commit is contained in:
committed by
GitHub
parent
34c527d694
commit
7aff9806eb
@@ -6,7 +6,7 @@ describe "Composer don't feed the trolls popup", type: :system do
|
||||
fab!(:topic) { Fabricate(:topic, user: user) }
|
||||
fab!(:post) { Fabricate(:post, user: user, topic: topic) }
|
||||
fab!(:reply) { Fabricate(:post, user: troll, topic: topic) }
|
||||
fab!(:flag) { Fabricate(:flag, post: reply, user: user) }
|
||||
fab!(:flag) { Fabricate(:flag_post_action, post: reply, user: user) }
|
||||
let(:topic_page) { PageObjects::Pages::Topic.new }
|
||||
|
||||
before { sign_in user }
|
||||
|
||||
@@ -12,7 +12,7 @@ describe "Flagging post", type: :system do
|
||||
|
||||
describe "Using Take Action" do
|
||||
it "can select the default action to hide the post, agree with other flags, and reach the flag threshold" do
|
||||
other_flag = Fabricate(:flag, post: post_to_flag, user: Fabricate(:moderator))
|
||||
other_flag = Fabricate(:flag_post_action, post: post_to_flag, user: Fabricate(:moderator))
|
||||
other_flag_reviewable =
|
||||
Fabricate(:reviewable_flagged_post, target: post_to_flag, created_by: other_flag.user)
|
||||
expect(other_flag.reload.agreed_at).to be_nil
|
||||
|
||||
Reference in New Issue
Block a user