added artist ban capability

This commit is contained in:
albert
2011-10-16 22:28:56 -04:00
parent 05e50ea591
commit e507f3dfd1
5 changed files with 61 additions and 24 deletions

View File

@@ -14,6 +14,24 @@ class ArtistTest < ActiveSupport::TestCase
CurrentUser.ip_addr = nil
end
context "that has been banned" do
setup do
@post = Factory.create(:post, :tag_string => "aaa")
@artist = Factory.create(:artist, :name => "aaa")
@artist.reload
@artist.update_attributes(:is_banned => true)
@post.reload
end
should "delete the post" do
assert(@post.is_deleted?)
end
should "create a new tag implication" do
assert_equal(1, TagImplication.where(:antecedent_name => "aaa", :consequent_name => "banned_artist").count)
end
end
should "create a new wiki page to store any note information" do
artist = nil
assert_difference("WikiPage.count") do