Integration tests

This commit is contained in:
Karel Picman 2017-04-07 16:55:02 +02:00
parent 41974657e1
commit 0122cdc24d
3 changed files with 3 additions and 5 deletions

View File

@ -258,9 +258,7 @@ class DmsfWebdavDeleteTest < RedmineDmsf::Test::IntegrationTest
@project1.enable_module! :dmsf
@role.add_permission! :view_dmsf_folders
@role.add_permission! :file_delete
file = @file1.copy_to_filename(@project1, nil, "delete_test.tmp")
@file1.copy_to_filename(@project1, nil, "delete_test.tmp")
delete "/dmsf/webdav/#{@project1.identifier}/delete_test.tmp", nil, @jsmith
# The file should be destroyed
assert_nil DmsfFile.find_file_by_name(@project1, nil, 'delete_test.tmp')

View File

@ -90,7 +90,7 @@ class DmsfWebdavMoveTest < RedmineDmsf::Test::IntegrationTest
assert_match '<D:depth>infinity</D:depth>', response.body
# 1.week = 7*24*3600=604800 seconds
assert_match '<D:timeout>Second-604800</D:timeout>', response.body
assert_match /<D:locktoken><D:href>([a-z0-9\-]+)<\/D:href><\/D:locktoken>/, response.body
assert_match(/<D:locktoken><D:href>([a-z0-9\-]+)<\/D:href><\/D:locktoken>/, response.body)
# Extract the locktoken, needed when refreshing the lock
response.body.match(/<D:locktoken><D:href>([a-z0-9\-]+)<\/D:href><\/D:locktoken>/)
locktoken=$1

View File

@ -315,6 +315,6 @@ class DmsfWebdavPutTest < RedmineDmsf::Test::IntegrationTest
assert_response :success # 201 - Created
end
end
end
end
end