added whenever (cron replacement), fixed related tag calculation updates (now delayed), tag subscriptions now calculated on cron

This commit is contained in:
albert
2011-08-05 19:07:28 -04:00
parent e106f70b6d
commit c078178fc4
8 changed files with 33 additions and 11 deletions

View File

@@ -525,7 +525,13 @@ class PostTest < ActiveSupport::TestCase
assert_equal(post2.id, relation.first.id)
end
should "return posts for a tag subscription search"
should "return posts for a tag subscription search" do
post1 = Factory.create(:post, :tag_string => "aaa")
sub = Factory.create(:tag_subscription, :tag_query => "aaa", :name => "zzz")
TagSubscription.process_all
relation = Post.tag_match("sub:#{CurrentUser.name}")
assert_equal(1, relation.count)
end
should "return posts for a particular rating" do
post1 = Factory.create(:post, :rating => "s")

View File

@@ -6,6 +6,7 @@ class TagTest < ActiveSupport::TestCase
CurrentUser.user = user
CurrentUser.ip_addr = "127.0.0.1"
MEMCACHE.flush_all
Delayed::Worker.delay_jobs = false
end
teardown do