]> source.dussan.org Git - redmine.git/commitdiff
fix source indent of AttachmentTest
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 27 Oct 2020 15:18:33 +0000 (15:18 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 27 Oct 2020 15:18:33 +0000 (15:18 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@20209 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/attachment_test.rb

index 90d0dc6794f928daf87a1eb4deb043970259efe1..868e83f4882626ddc8ed78ae94adb2d5e16f63a6 100644 (file)
@@ -398,12 +398,15 @@ class AttachmentTest < ActiveSupport::TestCase
 
   def test_update_attachments
     attachments = Attachment.where(:id => [2, 3]).to_a
-
-    assert Attachment.update_attachments(attachments, {
-      '2' => {:filename => 'newname.txt', :description => 'New description'},
-      3 => {:filename => 'othername.txt'}
-    })
-
+    assert(
+      Attachment.update_attachments(
+        attachments,
+        {
+          '2' => {:filename => 'newname.txt', :description => 'New description'},
+          3 => {:filename => 'othername.txt'}
+        }
+      )
+    )
     attachment = Attachment.find(2)
     assert_equal 'newname.txt', attachment.filename
     assert_equal 'New description', attachment.description
@@ -414,23 +417,29 @@ class AttachmentTest < ActiveSupport::TestCase
 
   def test_update_attachments_with_failure
     attachments = Attachment.where(:id => [2, 3]).to_a
-
-    assert !Attachment.update_attachments(attachments, {
-      '2' => {:filename => '', :description => 'New description'},
-      3 => {:filename => 'othername.txt'}
-    })
-
+    assert(
+      !Attachment.update_attachments(
+        attachments,
+        {
+          '2' => {
+            :filename => '', :description => 'New description'
+          },
+          3 => {:filename => 'othername.txt'}
+        }
+      )
+    )
     attachment = Attachment.find(3)
     assert_equal 'logo.gif', attachment.filename
   end
 
   def test_update_attachments_should_sanitize_filename
     attachments = Attachment.where(:id => 2).to_a
-
-    assert Attachment.update_attachments(attachments, {
-      2 => {:filename => 'newname?.txt'},
-    })
-
+    assert(
+      Attachment.update_attachments(
+        attachments,
+        {2 => {:filename => 'newname?.txt'},}
+      )
+    )
     attachment = Attachment.find(2)
     assert_equal 'newname_.txt', attachment.filename
   end