tests: fix tests for Rails.cache.

This commit is contained in:
evazion
2017-04-15 21:51:56 -05:00
parent 192190a313
commit c0e5c400a7
46 changed files with 14 additions and 69 deletions

View File

@@ -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)

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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