summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2020-10-27 15:18:33 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2020-10-27 15:18:33 +0000
commit2719f852227d5792a35dbec0e34748b4e30b7649 (patch)
tree3cdc7e49d2ef7e91956caa64208309455f4f55c9 /test
parent6f3e42289db5da4ce95fca015a5c238be18182d1 (diff)
downloadredmine-2719f852227d5792a35dbec0e34748b4e30b7649.tar.gz
redmine-2719f852227d5792a35dbec0e34748b4e30b7649.zip
fix source indent of AttachmentTest
git-svn-id: http://svn.redmine.org/redmine/trunk@20209 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/unit/attachment_test.rb43
1 files changed, 26 insertions, 17 deletions
diff --git a/test/unit/attachment_test.rb b/test/unit/attachment_test.rb
index 90d0dc679..868e83f48 100644
--- a/test/unit/attachment_test.rb
+++ b/test/unit/attachment_test.rb
@@ -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