mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 18:38:03 +08:00
FEATURE: New 'Reviewable' model to make reviewable items generic
Includes support for flags, reviewable users and queued posts, with REST API backwards compatibility. Co-Authored-By: romanrizzi <romanalejandro@gmail.com> Co-Authored-By: jjaffeux <j.jaffeux@gmail.com>
This commit is contained in:
@ -781,10 +781,11 @@ describe Topic do
|
||||
end
|
||||
|
||||
context "user actions" do
|
||||
let(:actions) { topic.user.user_actions }
|
||||
|
||||
it "should set up actions correctly" do
|
||||
UserActionCreator.enable
|
||||
UserActionManager.enable
|
||||
|
||||
post = create_post(archetype: 'private_message', target_usernames: [Fabricate(:coding_horror).username])
|
||||
actions = post.user.user_actions
|
||||
|
||||
expect(actions.map { |a| a.action_type }).not_to include(UserAction::NEW_TOPIC)
|
||||
expect(actions.map { |a| a.action_type }).to include(UserAction::NEW_PRIVATE_MESSAGE)
|
||||
|
Reference in New Issue
Block a user