unit tests fix
This commit is contained in:
parent
dfa474023d
commit
ede0e4fcc8
@ -525,7 +525,14 @@ module RedmineDmsf
|
||||
# Token based unlock (authenticated) will ensure that a correct token is sent, further ensuring
|
||||
# ownership of token before permitting unlock
|
||||
def unlock(token)
|
||||
return NotFound unless exist?
|
||||
unless exist?
|
||||
puts ">>> exists? => false"
|
||||
puts ">>> #{subproject&.name}"
|
||||
puts ">>> #{folder&.title}"
|
||||
puts ">>> #{file&.name}"
|
||||
puts ">>> #{project&.name}"
|
||||
return NotFound
|
||||
end
|
||||
if token.nil? || token.empty? || (token == '<(null)>') || User.current.anonymous?
|
||||
BadRequest
|
||||
else
|
||||
|
||||
@ -123,6 +123,7 @@ class DmsfWebdavUnlockTest < RedmineDmsf::Test::IntegrationTest
|
||||
def test_unlock_folder
|
||||
log_user 'jsmith', 'jsmith'
|
||||
l = @folder2.locks.first
|
||||
puts ">>> process unlock"
|
||||
process :unlock, "/dmsf/webdav/#{@folder2.project.identifier}/#{@folder2.dmsf_folder.title}/#{@folder2.title}",
|
||||
params: nil,
|
||||
headers: @jsmith.merge!({ HTTP_DEPTH: 'infinity', HTTP_TIMEOUT: 'Infinite', HTTP_LOCK_TOKEN: l.uuid })
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user