diff options
author | Eric Davis <edavis@littlestreamsoftware.com> | 2010-09-13 20:35:03 +0000 |
---|---|---|
committer | Eric Davis <edavis@littlestreamsoftware.com> | 2010-09-13 20:35:03 +0000 |
commit | 41c055363ee4826799b9ffe7d76fd399c89190d3 (patch) | |
tree | 78321389f47072812eeb42dc6d5759f8c15addbb /test/functional/files_controller_test.rb | |
parent | 12e10f6956fcd276fc3da19beb0c7bf4ade5f0da (diff) | |
download | redmine-41c055363ee4826799b9ffe7d76fd399c89190d3.tar.gz redmine-41c055363ee4826799b9ffe7d76fd399c89190d3.zip |
Refactor: split FilesController#new into #new and #create.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4084 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/files_controller_test.rb')
-rw-r--r-- | test/functional/files_controller_test.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/functional/files_controller_test.rb b/test/functional/files_controller_test.rb index 838caee70..2f6f009e7 100644 --- a/test/functional/files_controller_test.rb +++ b/test/functional/files_controller_test.rb @@ -26,14 +26,14 @@ class FilesControllerTest < ActionController::TestCase :attributes => { :href => '/attachments/download/9/version_file.zip' } end - def test_add_file + def test_create_file set_tmp_attachments_directory @request.session[:user_id] = 2 Setting.notified_events = ['file_added'] ActionMailer::Base.deliveries.clear assert_difference 'Attachment.count' do - post :new, :id => 1, :version_id => '', + post :create, :id => 1, :version_id => '', :attachments => {'1' => {'file' => uploaded_test_file('testfile.txt', 'text/plain')}} assert_response :redirect end @@ -48,13 +48,13 @@ class FilesControllerTest < ActionController::TestCase assert mail.body.include?('testfile.txt') end - def test_add_version_file + def test_create_version_file set_tmp_attachments_directory @request.session[:user_id] = 2 Setting.notified_events = ['file_added'] assert_difference 'Attachment.count' do - post :new, :id => 1, :version_id => '2', + post :create, :id => 1, :version_id => '2', :attachments => {'1' => {'file' => uploaded_test_file('testfile.txt', 'text/plain')}} assert_response :redirect end |