implement postarchive

This commit is contained in:
Albert Yi
2017-01-13 17:21:05 -08:00
committed by r888888888
parent 6c9d5e4f9a
commit 5404c1d231
17 changed files with 378 additions and 98 deletions

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)