Use File.exist? instead of deprecated File.exists? (#36358).

git-svn-id: http://svn.redmine.org/redmine/trunk@21327 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA
2021-12-27 03:20:31 +00:00
parent 91c00f51ec
commit 4db7397d2a
13 changed files with 23 additions and 23 deletions

View File

@@ -4716,7 +4716,7 @@ class IssuesControllerTest < Redmine::ControllerTest
assert_equal 'text/plain', attachment.content_type
assert_equal 'test file', attachment.description
assert_equal 59, attachment.filesize
assert File.exists?(attachment.diskfile)
assert File.exist?(attachment.diskfile)
assert_equal 59, File.size(attachment.diskfile)
end
@@ -4780,7 +4780,7 @@ class IssuesControllerTest < Redmine::ControllerTest
attachment = Attachment.order('id DESC').first
assert_equal 'testfile.txt', attachment.filename
assert File.exists?(attachment.diskfile)
assert File.exist?(attachment.diskfile)
assert_nil attachment.container
assert_select 'input[name=?][value=?]', 'attachments[p0][token]', attachment.token
@@ -6289,7 +6289,7 @@ class IssuesControllerTest < Redmine::ControllerTest
assert_equal 'text/plain', attachment.content_type
assert_equal 'test file', attachment.description
assert_equal 59, attachment.filesize
assert File.exists?(attachment.diskfile)
assert File.exist?(attachment.diskfile)
assert_equal 59, File.size(attachment.diskfile)
mail = ActionMailer::Base.deliveries.last
@@ -6323,7 +6323,7 @@ class IssuesControllerTest < Redmine::ControllerTest
attachment = Attachment.order('id DESC').first
assert_equal 'testfile.txt', attachment.filename
assert File.exists?(attachment.diskfile)
assert File.exist?(attachment.diskfile)
assert_nil attachment.container
assert_select 'input[name=?][value=?]', 'attachments[p0][token]', attachment.token