support pool version archive

This commit is contained in:
Albert Yi
2016-12-14 18:09:45 -08:00
parent 3c038f76f9
commit ee4ebce4d7
22 changed files with 300 additions and 64 deletions

View File

@@ -1,7 +1,10 @@
require 'test_helper'
require 'helpers/pool_archive_test_helper'
module PostSets
class PoolTest < ActiveSupport::TestCase
include PoolArchiveTestHelper
context "In all cases" do
setup do
@user = FactoryGirl.create(:user)
@@ -9,6 +12,9 @@ module PostSets
CurrentUser.ip_addr = "127.0.0.1"
MEMCACHE.flush_all
mock_pool_archive_service!
start_pool_archive_transaction
@post_1 = FactoryGirl.create(:post)
@post_2 = FactoryGirl.create(:post)
@post_3 = FactoryGirl.create(:post)
@@ -19,6 +25,7 @@ module PostSets
end
teardown do
rollback_pool_archive_transaction
CurrentUser.user = nil
CurrentUser.ip_addr = nil
end