From d54526e1ffa27f7eebcb46cc8894f714a6215fde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Pi=C4=8Dman?= Date: Fri, 8 Nov 2019 15:55:58 +0100 Subject: [PATCH] #913 tests --- .../webdav/dmsf_webdav_custom_middleware_test.rb | 12 +++++++++++- test/integration/webdav/dmsf_webdav_options_test.rb | 10 ---------- test/integration/webdav/dmsf_webdav_propfind_test.rb | 10 ---------- 3 files changed, 11 insertions(+), 21 deletions(-) diff --git a/test/integration/webdav/dmsf_webdav_custom_middleware_test.rb b/test/integration/webdav/dmsf_webdav_custom_middleware_test.rb index c180ff00..0ec4940f 100644 --- a/test/integration/webdav/dmsf_webdav_custom_middleware_test.rb +++ b/test/integration/webdav/dmsf_webdav_custom_middleware_test.rb @@ -33,7 +33,7 @@ class DmsfWebdavCustomMiddlewareTest < RedmineDmsf::Test::IntegrationTest def test_options_for_root_path process :options, '/' - assert_response defined?(EasyExtensions) ? :method_not_allowed : :not_found + assert_response :success end def test_options_for_dmsf_root_path @@ -41,6 +41,16 @@ class DmsfWebdavCustomMiddlewareTest < RedmineDmsf::Test::IntegrationTest assert_response :success end + def test_propfind_for_root_path + process :propfind, '/' + assert_response :not_found + end + + def test_propfind_for_dmsf_root_path + process :propfind, '/dmsf' + assert_response :not_found + end + def test_webdav_not_enabled Setting.plugin_redmine_dmsf['dmsf_webdav'] = nil process :options, '/dmsf/webdav' diff --git a/test/integration/webdav/dmsf_webdav_options_test.rb b/test/integration/webdav/dmsf_webdav_options_test.rb index a082ba46..83821894 100644 --- a/test/integration/webdav/dmsf_webdav_options_test.rb +++ b/test/integration/webdav/dmsf_webdav_options_test.rb @@ -176,14 +176,4 @@ class DmsfWebdavOptionsTest < RedmineDmsf::Test::IntegrationTest assert_response :not_found end - def test_ms_redirector_workaround_dmsf - process :options, '/dmsf', params: nil, headers: @jsmith - assert_response :success - end - - def test_ms_redirector_workaround_root - process :options, '/', params: nil, headers: @jsmith - assert_response :success - end - end diff --git a/test/integration/webdav/dmsf_webdav_propfind_test.rb b/test/integration/webdav/dmsf_webdav_propfind_test.rb index b77862b7..e97c1147 100644 --- a/test/integration/webdav/dmsf_webdav_propfind_test.rb +++ b/test/integration/webdav/dmsf_webdav_propfind_test.rb @@ -177,14 +177,4 @@ class DmsfWebdavPropfindTest < RedmineDmsf::Test::IntegrationTest assert response.body.include?("#{project1_new_name}") end - def test_ms_redirector_workaround_dmsf - process :propfind, '/dmsf', params: nil, headers: @jsmith - assert_response :not_found - end - - def test_ms_redirector_workaround_root - process :propfind, '/', params: nil, headers: @jsmith - assert_response :not_found - end - end \ No newline at end of file