Tag Aliases: automatically remove redundant implications

This commit is contained in:
nonamethanks
2021-03-19 15:26:14 +01:00
parent 0249c290fd
commit 917b08639f
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