diff --git a/test/unit/artist_test.rb b/test/unit/artist_test.rb index 4726cb0ab..d9f56a932 100644 --- a/test/unit/artist_test.rb +++ b/test/unit/artist_test.rb @@ -62,7 +62,8 @@ class ArtistTest < ActiveSupport::TestCase setup do @post = FactoryGirl.create(:post, :tag_string => "aaa") @artist = FactoryGirl.create(:artist, :name => "aaa") - @artist.ban! + @admin = FactoryGirl.create(:admin_user) + CurrentUser.scoped(@admin) { @artist.ban! } @post.reload end @@ -89,6 +90,11 @@ class ArtistTest < ActiveSupport::TestCase assert_equal(1, TagImplication.where(:antecedent_name => "aaa", :consequent_name => "banned_artist").count) assert_equal("aaa banned_artist", @post.tag_string) end + + should "set the approver of the banned_artist implication" do + ta = TagImplication.where(:antecedent_name => "aaa", :consequent_name => "banned_artist").first + assert_equal(@admin.id, ta.approver.id) + end end should "create a new wiki page to store any note information" do