akismet integration

This commit is contained in:
r888888888
2017-09-14 13:19:16 -07:00
parent d12f082f9a
commit b944b642b8
14 changed files with 90 additions and 3 deletions

View File

@@ -15,6 +15,19 @@ class DmailTest < ActiveSupport::TestCase
CurrentUser.user = nil
end
context "spam" do
setup do
@recipient = FactoryGirl.create(:user)
end
should "not validate" do
assert_difference("Dmail.count", 2)do
dmail = Dmail.create_split(:to_id => @recipient.id, :title => "My video", :body => "hey Noneeditsonlyme. My webcam see here http://bit.ly/2vTv9Ki")
assert(dmail.is_spam?)
end
end
end
context "filter" do
setup do
@recipient = FactoryGirl.create(:user)