fixes #1211 for renamed artists

This commit is contained in:
Toks
2013-10-26 00:13:09 -04:00
parent 11871d88b6
commit 5cfea6a3d0
2 changed files with 14 additions and 3 deletions

View File

@@ -182,11 +182,20 @@ class ArtistTest < ActiveSupport::TestCase
assert_equal("yyy", artist.other_names)
end
should "update the category of the tag" do
should "update the category of the tag when created" do
tag = FactoryGirl.create(:tag, :name => "abc")
artist = FactoryGirl.create(:artist, :name => "abc")
tag.reload
assert_equal(Tag.categories.artist, tag.category)
end
should "update the category of the tag when renamed" do
tag = FactoryGirl.create(:tag, :name => "def")
artist = FactoryGirl.create(:artist, :name => "abc")
artist.name = "def"
artist.save
tag.reload
assert_equal(Tag.categories.artist, tag.category)
end
end
end