Commit 001d3b42fc6907f35f8c9ffcc3c8c62a85316e5d

Authored by Rodrigo Souto
1 parent 3133eb48

spammer_log: not clean log on tests

test/unit/comment_test.rb
... ... @@ -523,7 +523,6 @@ class CommentTest < ActiveSupport::TestCase
523 523 comment.spam!
524 524 log = File.open('log/test_spammers.log')
525 525 assert_match "Comment-id: #{comment.id} IP: 192.168.0.1", log.read
526   - SpammerLogger.clean_log
527 526 end
528 527  
529 528 should 'not need moderation if article is not moderated' do
... ...
test/unit/spammer_logger_test.rb
1 1 require File.dirname(__FILE__) + '/../test_helper'
2 2  
3 3 class SpammerLoggerTest < ActiveSupport::TestCase
4   -
5   - def setup
6   - SpammerLogger.reload_log
7   - end
8   -
9   - def teardown
10   - SpammerLogger.clean_log
11   - end
12   -
13 4 should 'log the spammer ip' do
14 5 SpammerLogger.log('192.168.0.1')
15 6 log = File.open('log/test_spammers.log')
... ... @@ -22,5 +13,4 @@ class SpammerLoggerTest &lt; ActiveSupport::TestCase
22 13 log = File.open('log/test_spammers.log')
23 14 assert_match "Comment-id: #{comment.id} IP: 192.168.0.1", log.read
24 15 end
25   -
26 16 end
... ...
test/unit/suggest_article_test.rb
... ... @@ -222,7 +222,6 @@ class SuggestArticleTest &lt; ActiveSupport::TestCase
222 222 t.spam!
223 223 log = File.open('log/test_spammers.log')
224 224 assert_match "SuggestArticle-id: #{t.id} IP: 192.168.0.1", log.read
225   - SpammerLogger.clean_log
226 225 end
227 226  
228 227 end
... ...