fixes to tag alias cache expiration, improved instructions for sign up

This commit is contained in:
albert
2013-03-13 12:15:56 -04:00
parent b40df085d6
commit 656d591806
12 changed files with 47 additions and 33 deletions

View File

@@ -20,7 +20,7 @@ class AliasAndImplicationImporterTest < ActiveSupport::TestCase
end
should "process it" do
assert_difference("Delayed::Job.count", 3) do
assert_difference("Delayed::Job.count", 4) do
@importer.process!
end
end

View File

@@ -45,6 +45,7 @@ class TagAliasCorrectionTest < ActiveSupport::TestCase
context "that is fixed" do
setup do
@correction.fix!
TagAlias.to_aliased(["aaa"])
end
should "now have the correct cache" do

View File

@@ -32,11 +32,11 @@ class TagAliasTest < ActiveSupport::TestCase
tag1 = FactoryGirl.create(:tag, :name => "aaa")
tag2 = FactoryGirl.create(:tag, :name => "bbb")
ta = FactoryGirl.create(:tag_alias, :antecedent_name => "aaa", :consequent_name => "bbb")
assert_nil(MEMCACHE.get("ta:aaa"))
ta.update_cache
assert_equal("bbb", MEMCACHE.get("ta:aaa"))
assert_nil(Cache.get("ta:aaa"))
TagAlias.to_aliased(["aaa"])
assert_equal("bbb", Cache.get("ta:aaa"))
ta.destroy
assert_nil(MEMCACHE.get("ta:aaa"))
assert_nil(Cache.get("ta:aaa"))
end
should "update any affected posts when saved" do