added additional artist test

This commit is contained in:
albert
2012-05-11 17:53:11 -04:00
parent 918664d828
commit 157789d4d5
2 changed files with 19 additions and 8 deletions

View File

@@ -14,6 +14,21 @@ class ArtistTest < ActiveSupport::TestCase
CurrentUser.ip_addr = nil
end
context "with a matching tag alias" do
setup do
@tag_alias = Factory.create(:tag_alias, :antecedent_name => "aaa", :consequent_name => "bbb")
@artist = Factory.create(:artist, :name => "aaa")
end
should "know it has an alias" do
assert_equal(true, @artist.has_tag_alias?)
end
should "know its alias" do
assert_equal("bbb", @artist.tag_alias_name)
end
end
context "that has been banned" do
setup do
@post = Factory.create(:post, :tag_string => "aaa")