mirror of
https://github.com/redmine/redmine.git
synced 2025-11-05 04:45:57 +01:00
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:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user