Merge branch 'post-archive'

This commit is contained in:
r888888888
2017-02-27 10:45:13 -08:00
20 changed files with 392 additions and 100 deletions

View File

@@ -53,7 +53,7 @@ module Moderator
end
should "render" do
assert_equal(1, PostVersion.count)
assert_equal(1, PostArchive.count)
get :show, {}, {:user_id => @admin.id}
assert_response :success
end

View File

@@ -144,12 +144,12 @@ class PostsControllerTest < ActionController::TestCase
context "revert action" do
setup do
@post.stubs(:merge_version?).returns(false)
PostArchive.sqs_service.stubs(:merge?).returns(false)
@post.update_attributes(:tag_string => "zzz")
end
should "work" do
@version = @post.versions(true).first
@version = @post.versions.first
assert_equal("aaaa", @version.tags)
post :revert, {:id => @post.id, :version_id => @version.id}, {:user_id => @user.id}
assert_redirected_to post_path(@post)