fixes #2526: Don't allow special characters ('*', etc...) in artist names

This commit is contained in:
r888888888
2015-10-06 15:03:12 -07:00
parent c9926d6c58
commit 6ce5223399
2 changed files with 19 additions and 0 deletions

View File

@@ -31,6 +31,12 @@ class ArtistTest < ActiveSupport::TestCase
CurrentUser.ip_addr = nil
end
should "should have a valid name" do
@artist = Artist.new(:name => "-blah")
@artist.save
assert_equal(["Name cannot begin with - or ~"], @artist.errors.full_messages)
end
context "with a matching tag alias" do
setup do
@tag_alias = FactoryGirl.create(:tag_alias, :antecedent_name => "aaa", :consequent_name => "bbb")