DmsfFileNotFoundError
This commit is contained in:
parent
02185f2c32
commit
22510b90fd
@ -64,7 +64,7 @@ class DmsfLock < ApplicationRecord
|
||||
end
|
||||
end
|
||||
|
||||
def self.find_by_param(*args)
|
||||
find(*args)
|
||||
def self.find_by_param(...)
|
||||
find(...)
|
||||
end
|
||||
end
|
||||
|
||||
@ -52,8 +52,8 @@ module Dav4rack
|
||||
end
|
||||
end
|
||||
|
||||
def render_lockdiscovery(**options)
|
||||
render_xml ox_element(D_PROP, ox_element(D_LOCKDISCOVERY, activelock(**options)))
|
||||
def render_lockdiscovery(...)
|
||||
render_xml ox_element(D_PROP, ox_element(D_LOCKDISCOVERY, activelock(...)))
|
||||
end
|
||||
|
||||
#
|
||||
|
||||
@ -31,7 +31,7 @@ class DmsfZipTest < RedmineDmsf::Test::HelperTest
|
||||
@dmsf_file1 = DmsfFile.find(1)
|
||||
@dmsf_folder2 = DmsfFolder.find(2)
|
||||
set_fixtures_attachments_directory
|
||||
@attachment4 = Attachment.find(4)
|
||||
@attachment6 = Attachment.find(6)
|
||||
end
|
||||
|
||||
def teardown
|
||||
@ -53,12 +53,13 @@ class DmsfZipTest < RedmineDmsf::Test::HelperTest
|
||||
end
|
||||
|
||||
def test_add_attachment
|
||||
@zip.add_attachment @attachment4, @attachment4.filename
|
||||
assert File.exist?(@attachment6.diskfile), @attachment6.diskfile
|
||||
@zip.add_attachment @attachment6, @attachment6.filename
|
||||
assert_equal 0, @zip.dmsf_files.size
|
||||
zip_file = @zip.finish
|
||||
Zip::File.open(zip_file) do |file|
|
||||
file.each do |entry|
|
||||
assert_equal @attachment4.filename, entry.name
|
||||
assert_equal @attachment6.filename, entry.name
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user