]> source.dussan.org Git - redmine.git/commitdiff
fix source indent of test/integration/api_test/attachments_test.rb
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 2 Dec 2020 13:31:54 +0000 (13:31 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 2 Dec 2020 13:31:54 +0000 (13:31 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@20543 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/integration/api_test/attachments_test.rb

index a9775745c6bbc92c58ad552b0e68a9842b8ba998..49a8fa91dfc021753f50df5c07be3ace5802aad5 100644 (file)
@@ -127,10 +127,13 @@ class Redmine::ApiTest::AttachmentsTest < Redmine::ApiTest::Base
   test "POST /uploads.xml should return the token" do
     set_tmp_attachments_directory
     assert_difference 'Attachment.count' do
-      post '/uploads.xml', :headers => {
+      post(
+        '/uploads.xml',
+        :headers => {
           "RAW_POST_DATA" => 'File content',
           "CONTENT_TYPE" => 'application/octet-stream'
         }.merge(credentials('jsmith'))
+      )
       assert_response :created
       assert_equal 'application/xml', response.media_type
     end
@@ -158,10 +161,13 @@ class Redmine::ApiTest::AttachmentsTest < Redmine::ApiTest::Base
   test "POST /uploads.json should return the token" do
     set_tmp_attachments_directory
     assert_difference 'Attachment.count' do
-      post '/uploads.json', :headers => {
+      post(
+        '/uploads.json',
+        :headers => {
           "RAW_POST_DATA" => 'File content',
           "CONTENT_TYPE" => 'application/octet-stream'
         }.merge(credentials('jsmith'))
+      )
       assert_response :created
       assert_equal 'application/json', response.media_type
     end
@@ -178,10 +184,13 @@ class Redmine::ApiTest::AttachmentsTest < Redmine::ApiTest::Base
   test "POST /uploads.xml should accept :filename param as the attachment filename" do
     set_tmp_attachments_directory
     assert_difference 'Attachment.count' do
-      post '/uploads.xml?filename=test.txt', :headers => {
+      post(
+        '/uploads.xml?filename=test.txt',
+        :headers => {
           "RAW_POST_DATA" => 'File content',
           "CONTENT_TYPE" => 'application/octet-stream'
         }.merge(credentials('jsmith'))
+      )
       assert_response :created
     end
 
@@ -193,10 +202,13 @@ class Redmine::ApiTest::AttachmentsTest < Redmine::ApiTest::Base
   test "POST /uploads.xml should not accept other content types" do
     set_tmp_attachments_directory
     assert_no_difference 'Attachment.count' do
-      post '/uploads.xml', :headers => {
+      post(
+        '/uploads.xml',
+        :headers => {
           "RAW_POST_DATA" => 'PNG DATA',
           "CONTENT_TYPE" => 'image/png'
         }.merge(credentials('jsmith'))
+      )
       assert_response 406
     end
   end
@@ -205,10 +217,13 @@ class Redmine::ApiTest::AttachmentsTest < Redmine::ApiTest::Base
     set_tmp_attachments_directory
     with_settings :attachment_max_size => 1 do
       assert_no_difference 'Attachment.count' do
-        post '/uploads.xml', :headers => {
+        post(
+          '/uploads.xml',
+          :headers => {
             "RAW_POST_DATA" => ('x' * 2048),
             "CONTENT_TYPE" => 'application/octet-stream'
           }.merge(credentials('jsmith'))
+        )
         assert_response 422
         assert_select 'error', :text => /exceeds the maximum allowed file size/
       end
@@ -218,9 +233,12 @@ class Redmine::ApiTest::AttachmentsTest < Redmine::ApiTest::Base
   test "POST /uploads.json should create an empty file and return a valid token" do
     set_tmp_attachments_directory
     assert_difference 'Attachment.count' do
-      post '/uploads.json', :headers => {
+      post(
+        '/uploads.json',
+        :headers => {
           "CONTENT_TYPE" => 'application/octet-stream'
         }.merge(credentials('jsmith'))
+      )
       assert_response :created
     end
     json = ActiveSupport::JSON.decode(response.body)