fix missing urls in artists (fixes #3632)

This commit is contained in:
Albert Yi
2018-04-13 12:25:49 -07:00
parent 31a9605ecb
commit 06559c4ae4
3 changed files with 21 additions and 6 deletions

View File

@@ -191,6 +191,7 @@ class ArtistTest < ActiveSupport::TestCase
context "when finding deviantart artists" do
setup do
skip "deviant art is not configured" unless Danbooru.config.deviantart_client_id.present?
FactoryBot.create(:artist, :name => "artgerm", :url_string => "http://artgerm.deviantart.com/")
FactoryBot.create(:artist, :name => "trixia", :url_string => "http://trixdraws.deviantart.com/")
end
@@ -461,5 +462,17 @@ class ArtistTest < ActiveSupport::TestCase
end
end
end
context "that is deleted" do
setup do
@artist = create(:artist, url_string: "https://google.com")
@artist.update_attribute(:is_active, false)
@artist.reload
end
should "preserve the url string" do
assert_equal(1, @artist.urls.count)
end
end
end
end