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:
Robin Ward
2019-01-03 12:03:01 -05:00
parent 9a56b398a1
commit b58867b6e9
354 changed files with 8090 additions and 5225 deletions

View File

@@ -44,8 +44,8 @@ describe PostMover do
Jobs.run_immediately!
p1.replies << p3
p2.replies << p4
UserActionCreator.enable
@like = PostAction.act(another_user, p4, PostActionType.types[:like])
UserActionManager.enable
@like = PostActionCreator.like(another_user, p4)
end
context 'success' do
@@ -452,7 +452,7 @@ describe PostMover do
end
it "preserves post actions in the new post" do
PostAction.act(another_user, p1, PostActionType.types[:like])
PostActionCreator.like(another_user, p1)
new_topic = topic.move_posts(user, [p1.id], title: "new testing topic name")
new_post = new_topic.posts.where(post_number: 1).first
@@ -573,8 +573,8 @@ describe PostMover do
Jobs.run_immediately!
p1.replies << p3
p2.replies << p4
UserActionCreator.enable
@like = PostAction.act(another_user, p4, PostActionType.types[:like])
UserActionManager.enable
@like = PostActionCreator.like(another_user, p4)
end
context 'move to new message' do