This commit is contained in:
Toks
2013-10-06 17:18:08 -04:00
parent f78de67de9
commit d7abbf2003
2 changed files with 5 additions and 5 deletions

View File

@@ -10,4 +10,4 @@ class UpdateAliasedImplicationConsequents < ActiveRecord::Migration
end
end
end
end
end

View File

@@ -63,15 +63,15 @@ class TagAliasTest < ActiveSupport::TestCase
end
should "move existing aliases" do
ta1 = FactoryGirl.create(:tag_alias, :antecedent_name => "aaa", :consequent_name => "bbb", :status => "active")
ta2 = FactoryGirl.create(:tag_alias, :antecedent_name => "bbb", :consequent_name => "ccc", :status => "active")
ta1 = FactoryGirl.create(:tag_alias, :antecedent_name => "aaa", :consequent_name => "bbb")
ta2 = FactoryGirl.create(:tag_alias, :antecedent_name => "bbb", :consequent_name => "ccc")
ta1.reload
assert_equal("ccc", ta1.consequent_name)
end
should "move existing implications" do
ti = FactoryGirl.create(:tag_implication, :antecedent_name => "aaa", :consequent_name => "bbb", :status => "active")
ta = FactoryGirl.create(:tag_alias, :antecedent_name => "bbb", :consequent_name => "ccc", :status => "active")
ti = FactoryGirl.create(:tag_implication, :antecedent_name => "aaa", :consequent_name => "bbb")
ta = FactoryGirl.create(:tag_alias, :antecedent_name => "bbb", :consequent_name => "ccc")
ti.reload
assert_equal("ccc", ti.consequent_name)
end