tests: fix tests for Rails.cache.
This commit is contained in:
@@ -7,7 +7,6 @@ module Moderator
|
||||
@mod = FactoryGirl.create(:moderator_user)
|
||||
CurrentUser.user = @mod
|
||||
CurrentUser.ip_addr = "127.0.0.1"
|
||||
MEMCACHE.flush_all
|
||||
|
||||
@user_1 = FactoryGirl.create(:user)
|
||||
@user_2 = FactoryGirl.create(:user, :inviter_id => @mod.id)
|
||||
|
||||
@@ -8,7 +8,6 @@ module Moderator
|
||||
CurrentUser.user = @user
|
||||
CurrentUser.ip_addr = "127.0.0.1"
|
||||
FactoryGirl.create(:comment)
|
||||
MEMCACHE.flush_all
|
||||
end
|
||||
|
||||
should "find by ip addr" do
|
||||
|
||||
@@ -8,7 +8,6 @@ class PostsControllerTest < ActionController::TestCase
|
||||
CurrentUser.user = @user
|
||||
CurrentUser.ip_addr = "127.0.0.1"
|
||||
@post = FactoryGirl.create(:post, :uploader_id => @user.id, :tag_string => "aaaa")
|
||||
MEMCACHE.flush_all
|
||||
end
|
||||
|
||||
teardown do
|
||||
|
||||
@@ -6,7 +6,6 @@ class TagAliasCorrectionsControllerTest < ActionController::TestCase
|
||||
@admin = FactoryGirl.create(:admin_user)
|
||||
CurrentUser.user = @admin
|
||||
CurrentUser.ip_addr = "127.0.0.1"
|
||||
MEMCACHE.flush_all
|
||||
@tag_alias = FactoryGirl.create(:tag_alias, :antecedent_name => "aaa", :consequent_name => "bbb")
|
||||
end
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ class TagAliasRequestsControllerTest < ActionController::TestCase
|
||||
@user = FactoryGirl.create(:user)
|
||||
CurrentUser.user = @user
|
||||
CurrentUser.ip_addr = "127.0.0.1"
|
||||
MEMCACHE.flush_all
|
||||
end
|
||||
|
||||
teardown do
|
||||
|
||||
@@ -6,7 +6,6 @@ class TagAliasesControllerTest < ActionController::TestCase
|
||||
@user = FactoryGirl.create(:admin_user)
|
||||
CurrentUser.user = @user
|
||||
CurrentUser.ip_addr = "127.0.0.1"
|
||||
MEMCACHE.flush_all
|
||||
end
|
||||
|
||||
teardown do
|
||||
|
||||
@@ -8,7 +8,6 @@ class TagImplicationRequestsControllerTest < ActionController::TestCase
|
||||
end
|
||||
CurrentUser.user = @user
|
||||
CurrentUser.ip_addr = "127.0.0.1"
|
||||
MEMCACHE.flush_all
|
||||
end
|
||||
|
||||
teardown do
|
||||
|
||||
@@ -6,7 +6,6 @@ class TagImplicationsControllerTest < ActionController::TestCase
|
||||
@user = FactoryGirl.create(:admin_user)
|
||||
CurrentUser.user = @user
|
||||
CurrentUser.ip_addr = "127.0.0.1"
|
||||
MEMCACHE.flush_all
|
||||
end
|
||||
|
||||
teardown do
|
||||
|
||||
Reference in New Issue
Block a user