fix tests
This commit is contained in:
@@ -667,7 +667,7 @@ class Post < ActiveRecord::Base
|
||||
Cache.delete(Post.count_cache_key(tag_name))
|
||||
end
|
||||
|
||||
if Post.fast_count("").to_i < 1000
|
||||
if CurrentUser.user.id < 1_000
|
||||
Cache.delete(Post.count_cache_key(""))
|
||||
end
|
||||
end
|
||||
|
||||
@@ -357,6 +357,7 @@ class PostTest < ActiveSupport::TestCase
|
||||
|
||||
context "with an artist tag that is then changed to copyright" do
|
||||
setup do
|
||||
CurrentUser.user = FactoryGirl.create(:builder_user)
|
||||
Delayed::Worker.delay_jobs = false
|
||||
@post = Post.find(@post.id)
|
||||
@post.update_attribute(:tag_string, "art:abc")
|
||||
|
||||
@@ -2,7 +2,7 @@ require 'test_helper'
|
||||
|
||||
class TagTest < ActiveSupport::TestCase
|
||||
setup do
|
||||
user = FactoryGirl.create(:user)
|
||||
user = FactoryGirl.create(:builder_user)
|
||||
CurrentUser.user = user
|
||||
CurrentUser.ip_addr = "127.0.0.1"
|
||||
MEMCACHE.flush_all
|
||||
|
||||
Reference in New Issue
Block a user