Test banning artist sets approver of banned_artist implication.
This commit is contained in:
@@ -62,7 +62,8 @@ class ArtistTest < ActiveSupport::TestCase
|
|||||||
setup do
|
setup do
|
||||||
@post = FactoryGirl.create(:post, :tag_string => "aaa")
|
@post = FactoryGirl.create(:post, :tag_string => "aaa")
|
||||||
@artist = FactoryGirl.create(:artist, :name => "aaa")
|
@artist = FactoryGirl.create(:artist, :name => "aaa")
|
||||||
@artist.ban!
|
@admin = FactoryGirl.create(:admin_user)
|
||||||
|
CurrentUser.scoped(@admin) { @artist.ban! }
|
||||||
@post.reload
|
@post.reload
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -89,6 +90,11 @@ class ArtistTest < ActiveSupport::TestCase
|
|||||||
assert_equal(1, TagImplication.where(:antecedent_name => "aaa", :consequent_name => "banned_artist").count)
|
assert_equal(1, TagImplication.where(:antecedent_name => "aaa", :consequent_name => "banned_artist").count)
|
||||||
assert_equal("aaa banned_artist", @post.tag_string)
|
assert_equal("aaa banned_artist", @post.tag_string)
|
||||||
end
|
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
|
end
|
||||||
|
|
||||||
should "create a new wiki page to store any note information" do
|
should "create a new wiki page to store any note information" do
|
||||||
|
|||||||
Reference in New Issue
Block a user