diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-07-08 12:23:47 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-07-08 12:23:47 +0000 |
commit | 7acd04fb87229cd35c5c7a765bf1cfe9aaf69052 (patch) | |
tree | 5f0ebbf6dad1356c3ec76fff9fb96344c28e138c /test/functional/documents_controller_test.rb | |
parent | 133ca59edb5aa835fd8c9f967c06d8b5a4e8d581 (diff) | |
download | redmine-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/documents_controller_test.rb')
-rw-r--r-- | test/functional/documents_controller_test.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/functional/documents_controller_test.rb b/test/functional/documents_controller_test.rb index 5b76d8407..b9ff12ad6 100644 --- a/test/functional/documents_controller_test.rb +++ b/test/functional/documents_controller_test.rb @@ -95,16 +95,16 @@ LOREM def test_create_with_one_attachment ActionMailer::Base.deliveries.clear - Setting.notified_events << 'document_added' @request.session[:user_id] = 2 set_tmp_attachments_directory - post :create, :project_id => 'ecookbook', + with_settings :notified_events => %w(document_added) do + post :create, :project_id => 'ecookbook', :document => { :title => 'DocumentsControllerTest#test_post_new', :description => 'This is a new document', :category_id => 2}, :attachments => {'1' => {'file' => uploaded_test_file('testfile.txt', 'text/plain')}} - + end assert_redirected_to '/projects/ecookbook/documents' document = Document.find_by_title('DocumentsControllerTest#test_post_new') |