summaryrefslogtreecommitdiffstats
path: root/test/functional/messages_controller_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-07-08 12:23:47 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-07-08 12:23:47 +0000
commit7acd04fb87229cd35c5c7a765bf1cfe9aaf69052 (patch)
tree5f0ebbf6dad1356c3ec76fff9fb96344c28e138c /test/functional/messages_controller_test.rb
parent133ca59edb5aa835fd8c9f967c06d8b5a4e8d581 (diff)
downloadredmine-7acd04fb87229cd35c5c7a765bf1cfe9aaf69052.tar.gz
redmine-7acd04fb87229cd35c5c7a765bf1cfe9aaf69052.zip
Tests should not change settings.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9949 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/messages_controller_test.rb')
-rw-r--r--test/functional/messages_controller_test.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/functional/messages_controller_test.rb b/test/functional/messages_controller_test.rb
index 5f8b22af4..294f87035 100644
--- a/test/functional/messages_controller_test.rb
+++ b/test/functional/messages_controller_test.rb
@@ -91,11 +91,12 @@ class MessagesControllerTest < ActionController::TestCase
def test_post_new
@request.session[:user_id] = 2
ActionMailer::Base.deliveries.clear
- Setting.notified_events = ['message_posted']
- post :new, :board_id => 1,
+ with_settings :notified_events => %w(message_posted) do
+ post :new, :board_id => 1,
:message => { :subject => 'Test created message',
:content => 'Message body'}
+ end
message = Message.find_by_subject('Test created message')
assert_not_nil message
assert_redirected_to "/boards/1/topics/#{message.to_param}"