Merge pull request #4772 from nonamethanks/fix-alias-implication

Tag Aliases: automatically remove redundant implications
This commit is contained in:
evazion
2021-03-30 00:40:11 -05:00
committed by GitHub
2 changed files with 15 additions and 4 deletions

View File

@@ -286,5 +286,12 @@ class TagAliasTest < ActiveSupport::TestCase
assert_equal(4, tag1.reload.category)
assert_equal(3, tag2.reload.category)
end
should "automatically remove a redundant implication" do
ti = create(:tag_implication, antecedent_name: "new_asuka", consequent_name: "asuka", status: "active")
create(:tag_alias, antecedent_name: "new_asuka", consequent_name: "asuka", status: "active")
assert_equal("deleted", ti.reload.status)
end
end
end