artists: rename is_active flag to is_deleted.
Rename is_active to is_deleted. This is for better consistency with other models, and to reduce confusion over what "active" means for artists. Sometimes users think active is for whether the artist is actively producing work.
This commit is contained in:
@@ -191,7 +191,7 @@ class ArtistTest < ActiveSupport::TestCase
|
||||
end
|
||||
|
||||
should "hide deleted artists" do
|
||||
FactoryBot.create(:artist, :name => "warhol", :url_string => "http://warhol.com/a/image.jpg", :is_active => false)
|
||||
create(:artist, name: "warhol", url_string: "http://warhol.com/a/image.jpg", is_deleted: true)
|
||||
assert_artist_not_found("http://warhol.com/a/image.jpg")
|
||||
end
|
||||
|
||||
@@ -512,7 +512,7 @@ class ArtistTest < ActiveSupport::TestCase
|
||||
context "that is deleted" do
|
||||
setup do
|
||||
@artist = create(:artist, url_string: "https://google.com")
|
||||
@artist.update_attribute(:is_active, false)
|
||||
@artist.update_attribute(:is_deleted, true)
|
||||
@artist.reload
|
||||
end
|
||||
|
||||
|
||||
@@ -191,12 +191,12 @@ class ArtistUrlTest < ActiveSupport::TestCase
|
||||
subject { ArtistUrl }
|
||||
|
||||
should "work" do
|
||||
@bkub = FactoryBot.create(:artist, name: "bkub", is_active: true, url_string: "https://bkub.com")
|
||||
@masao = FactoryBot.create(:artist, name: "masao", is_active: false, url_string: "-https://masao.com")
|
||||
@bkub = create(:artist, name: "bkub", url_string: "https://bkub.com")
|
||||
@masao = create(:artist, name: "masao", url_string: "-https://masao.com")
|
||||
@bkub_url = @bkub.urls.first
|
||||
@masao_url = @masao.urls.first
|
||||
|
||||
assert_search_equals([@bkub_url], is_active: true)
|
||||
assert_search_equals([@bkub_url], is_deleted: false)
|
||||
assert_search_equals([@bkub_url], artist: { name: "bkub" })
|
||||
|
||||
assert_search_equals([@bkub_url], url_matches: "*bkub*")
|
||||
|
||||
Reference in New Issue
Block a user