diff options
author | Go MAEDA <maeda@farend.jp> | 2021-12-27 03:20:31 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2021-12-27 03:20:31 +0000 |
commit | 4db7397d2a46e745da298a4abd5d6f9e3002e2d2 (patch) | |
tree | e86884a4edf8e414b6dc32582763458a724e88a2 /test/unit/attachment_test.rb | |
parent | 91c00f51ec9d9ade33d2bb22a8e67c8cf6b29ba8 (diff) | |
download | redmine-4db7397d2a46e745da298a4abd5d6f9e3002e2d2.tar.gz redmine-4db7397d2a46e745da298a4abd5d6f9e3002e2d2.zip |
Use File.exist? instead of deprecated File.exists? (#36358).
git-svn-id: http://svn.redmine.org/redmine/trunk@21327 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/attachment_test.rb')
-rw-r--r-- | test/unit/attachment_test.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/unit/attachment_test.rb b/test/unit/attachment_test.rb index 954c44269..e0b53e07b 100644 --- a/test/unit/attachment_test.rb +++ b/test/unit/attachment_test.rb @@ -208,11 +208,11 @@ class AttachmentTest < ActiveSupport::TestCase copy = a.copy copy.save! - assert File.exists?(diskfile) + assert File.exist?(diskfile) a.destroy - assert File.exists?(diskfile) + assert File.exist?(diskfile) copy.destroy - assert !File.exists?(diskfile) + assert !File.exist?(diskfile) end def test_create_should_auto_assign_content_type @@ -387,7 +387,7 @@ class AttachmentTest < ActiveSupport::TestCase assert_equal 59, attachment.filesize assert_equal 'test', attachment.description assert_equal 'text/plain', attachment.content_type - assert File.exists?(attachment.diskfile) + assert File.exist?(attachment.diskfile) assert_equal 59, File.size(attachment.diskfile) end |