Fix #4908: Prevent artist entries from being made on disambiguation tags.

Don't allow artist entries to be created for deprecated tags.
This commit is contained in:
evazion
2022-04-30 15:21:10 -05:00
parent 918f32c554
commit f8aa985a16
2 changed files with 12 additions and 0 deletions

View File

@@ -549,6 +549,14 @@ class ArtistTest < ActiveSupport::TestCase
assert_equal(true, artist.invalid?)
assert_match(/'foo' is aliased to 'bar'/, artist.errors.full_messages.join)
end
should "not allow creating artist entries for deprecated tags" do
create(:tag, name: "orange", is_deprecated: true)
artist = build(:artist, name: "orange")
assert_equal(true, artist.invalid?)
assert_match(/'orange' is an ambiguous tag/, artist.errors.full_messages.join)
end
end
context "when renaming" do