clear artist urls before saving url string (fixes #3731)

This commit is contained in:
Albert Yi
2018-06-04 17:37:43 -07:00
parent dd6848912c
commit 52de1fb981
2 changed files with 9 additions and 4 deletions

View File

@@ -49,6 +49,13 @@ class ArtistTest < ActiveSupport::TestCase
refute(@artist.urls[0].is_active?)
end
should "allow activating a url" do
@artist = Artist.create(name: "blah", url_string: "-http://monet.com")
@artist.update(url_string: "http://monet.com")
assert_equal(1, @artist.urls.count)
assert(@artist.urls[0].is_active?)
end
should "should have a valid name" do
@artist = Artist.new(:name => "-blah")
@artist.save