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