diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2020-11-30 15:48:28 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2020-11-30 15:48:28 +0000 |
commit | 3bf806d0b9b7645a448b88a3377c75572f0aaba7 (patch) | |
tree | 9abd618a60f591c11d681afa6147ce98e399c01f | |
parent | bd143ce0fd273f1cb8eb679883f7120146ccd614 (diff) | |
download | redmine-3bf806d0b9b7645a448b88a3377c75572f0aaba7.tar.gz redmine-3bf806d0b9b7645a448b88a3377c75572f0aaba7.zip |
fix source indent of test/integration/attachments_test.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@20521 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | test/integration/attachments_test.rb | 52 |
1 files changed, 44 insertions, 8 deletions
diff --git a/test/integration/attachments_test.rb b/test/integration/attachments_test.rb index 49b99421f..8b819cbbd 100644 --- a/test/integration/attachments_test.rb +++ b/test/integration/attachments_test.rb @@ -59,10 +59,19 @@ class AttachmentsTest < Redmine::IntegrationTest token = ajax_upload('myupload.txt', 'File content') assert_difference 'Issue.count' do - post '/projects/ecookbook/issues', :params => { + post( + '/projects/ecookbook/issues', + :params => { :issue => {:tracker_id => 1, :subject => 'Issue with upload'}, - :attachments => {'1' => {:filename => 'myupload.txt', :description => 'My uploaded file', :token => token}} + :attachments => { + '1' => { + :filename => 'myupload.txt', + :description => 'My uploaded file', + :token => token + } + } } + ) assert_response 302 end @@ -81,11 +90,20 @@ class AttachmentsTest < Redmine::IntegrationTest token = ajax_upload('myupload.jpg', 'JPEG content') - post '/issues/preview', :params => { + post( + '/issues/preview', + :params => { :issue => {:tracker_id => 1, :project_id => 'ecookbook'}, :text => 'Inline upload: !myupload.jpg!', - :attachments => {'1' => {:filename => 'myupload.jpg', :description => 'My uploaded file', :token => token}} + :attachments => { + '1' => { + :filename => 'myupload.jpg', + :description => 'My uploaded file', + :token => token + } + } } + ) assert_response :success attachment_path = response.body.match(%r{<img src="(/attachments/download/\d+/myupload.jpg)"})[1] @@ -102,10 +120,19 @@ class AttachmentsTest < Redmine::IntegrationTest token = ajax_upload('myupload.txt', 'File content') assert_no_difference 'Issue.count' do - post '/projects/ecookbook/issues', :params => { + post( + '/projects/ecookbook/issues', + :params => { :issue => {:tracker_id => 1, :subject => ''}, - :attachments => {'1' => {:filename => 'myupload.txt', :description => 'My uploaded file', :token => token}} + :attachments => { + '1' => { + :filename => 'myupload.txt', + :description => 'My uploaded file', + :token => token + } + } } + ) assert_response :success end assert_select 'input[type=hidden][name=?][value=?]', 'attachments[p0][token]', token @@ -113,10 +140,19 @@ class AttachmentsTest < Redmine::IntegrationTest assert_select 'input[name=?][value=?]', 'attachments[p0][description]', 'My uploaded file' assert_difference 'Issue.count' do - post '/projects/ecookbook/issues', :params => { + post( + '/projects/ecookbook/issues', + :params => { :issue => {:tracker_id => 1, :subject => 'Issue with upload'}, - :attachments => {'p0' => {:filename => 'myupload.txt', :description => 'My uploaded file', :token => token}} + :attachments => { + 'p0' => { + :filename => 'myupload.txt', + :description => 'My uploaded file', + :token => token + } + } } + ) assert_response 302 end |