This commit is contained in:
r888888888
2018-05-26 12:58:19 -07:00
parent c054784302
commit ca842cc6d9
4 changed files with 27 additions and 7 deletions

View File

@@ -42,6 +42,13 @@ class ArtistTest < ActiveSupport::TestCase
refute(@artist.urls[0].is_active?)
end
should "allow deactivating 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)
refute(@artist.urls[0].is_active?)
end
should "should have a valid name" do
@artist = Artist.new(:name => "-blah")
@artist.save