Tests should not change settings.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9949 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -33,11 +33,12 @@ class CommentTest < ActiveSupport::TestCase
|
||||
end
|
||||
|
||||
def test_create_should_send_notification
|
||||
Setting.notified_events << 'news_comment_added'
|
||||
Watcher.create!(:watchable => @news, :user => @jsmith)
|
||||
|
||||
assert_difference 'ActionMailer::Base.deliveries.size' do
|
||||
Comment.create!(:commented => @news, :author => @jsmith, :comments => "my comment")
|
||||
with_settings :notified_events => %w(news_comment_added) do
|
||||
assert_difference 'ActionMailer::Base.deliveries.size' do
|
||||
Comment.create!(:commented => @news, :author => @jsmith, :comments => "my comment")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user