artists: reduce queries in artist summaries.
Avoid a few queries when searching for single artist tags.
This commit is contained in:
@@ -64,21 +64,6 @@ class ArtistTest < ActiveSupport::TestCase
|
||||
should_not allow_value("").for(:name)
|
||||
end
|
||||
|
||||
context "with a matching tag alias" do
|
||||
setup do
|
||||
@tag_alias = FactoryBot.create(:tag_alias, :antecedent_name => "aaa", :consequent_name => "bbb")
|
||||
@artist = FactoryBot.create(:artist, :name => "aaa")
|
||||
end
|
||||
|
||||
should "know it has an alias" do
|
||||
assert_equal(true, @artist.has_tag_alias?)
|
||||
end
|
||||
|
||||
should "know its alias" do
|
||||
assert_equal("bbb", @artist.tag_alias_name)
|
||||
end
|
||||
end
|
||||
|
||||
context "that has been banned" do
|
||||
setup do
|
||||
@post = FactoryBot.create(:post, :tag_string => "aaa")
|
||||
|
||||
Reference in New Issue
Block a user