diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-03-01 15:02:48 +0100 |
---|---|---|
committer | Côme Chilliet <91878298+come-nc@users.noreply.github.com> | 2024-03-07 14:06:08 +0100 |
commit | 3056bc4962bd3a6f3a42bf5670256afa5076ee54 (patch) | |
tree | 348547e6db9dfb453a82f6f0614b66f68cf41e7d /core/js/tests | |
parent | 1ea88a73f6343a9b39b30736086484d0c072ae46 (diff) | |
download | nextcloud-server-3056bc4962bd3a6f3a42bf5670256afa5076ee54.tar.gz nextcloud-server-3056bc4962bd3a6f3a42bf5670256afa5076ee54.zip |
fix(settings): Remove migrated SetupCheck from legacy JS code
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'core/js/tests')
-rw-r--r-- | core/js/tests/specs/setupchecksSpec.js | 81 |
1 files changed, 0 insertions, 81 deletions
diff --git a/core/js/tests/specs/setupchecksSpec.js b/core/js/tests/specs/setupchecksSpec.js index a0d6f69e1d9..bef316b16c9 100644 --- a/core/js/tests/specs/setupchecksSpec.js +++ b/core/js/tests/specs/setupchecksSpec.js @@ -60,53 +60,6 @@ describe('OC.SetupChecks tests', function() { }); }); - describe('checkWellKnownUrl', function() { - it('should fail with another response status code than the expected one', function(done) { - var async = OC.SetupChecks.checkWellKnownUrl('PROPFIND', '/.well-known/caldav', 'http://example.org/PLACEHOLDER', true, 207); - - suite.server.requests[0].respond(200); - - async.done(function( data, s, x ){ - expect(data).toEqual([{ - msg: 'Your web server is not properly set up to resolve "/.well-known/caldav". Further information can be found in the <a target="_blank" rel="noreferrer noopener" class="external" href="http://example.org/admin-setup-well-known-URL">documentation ↗</a>.', - type: OC.SetupChecks.MESSAGE_TYPE_INFO - }]); - done(); - }); - }); - - it('should return no error with the expected response status code', function(done) { - var async = OC.SetupChecks.checkWellKnownUrl('PROPFIND', '/.well-known/caldav', 'http://example.org/PLACEHOLDER', true, 207); - - suite.server.requests[0].respond(207); - - async.done(function( data, s, x ){ - expect(data).toEqual([]); - done(); - }); - }); - - it('should return no error with the default expected response status code', function(done) { - var async = OC.SetupChecks.checkWellKnownUrl('PROPFIND', '/.well-known/caldav', 'http://example.org/PLACEHOLDER', true); - - suite.server.requests[0].respond(207); - - async.done(function( data, s, x ){ - expect(data).toEqual([]); - done(); - }); - }); - - it('should return no error when no check should be run', function(done) { - var async = OC.SetupChecks.checkWellKnownUrl('PROPFIND', '/.well-known/caldav', 'http://example.org/PLACEHOLDER', false); - - async.done(function( data, s, x ){ - expect(data).toEqual([]); - done(); - }); - }); - }); - describe('checkSetup', function() { it('should return an error if server has no internet connection', function(done) { var async = OC.SetupChecks.checkSetup(); @@ -303,40 +256,6 @@ describe('OC.SetupChecks tests', function() { }); }); - // THe following test is invalid as the code in core/js/setupchecks.js is calling - // window.location.protocol which always return http during tests - // if there is a way to trick window.location.protocol during test, then we could re-activate it - /* - it('should return an error if the protocol is https but the server generates http links', function(done) { - var async = OC.SetupChecks.checkSetup(); - - suite.server.requests[0].respond( - 200, - { - 'Content-Type': 'application/json', - }, - JSON.stringify({ - generic: { - network: { - "Internet connectivity": { - severity: "success", - description: null, - linkToDoc: null - } - }, - }, - }) - ); - - async.done(function( data, s, x ){ - expect(data).toEqual([{ - msg: 'You are accessing your instance over a secure connection, however your instance is generating insecure URLs. This most likely means that you are behind a reverse proxy and the overwrite config variables are not set correctly. Please read <a target="_blank" rel="noreferrer noopener" class="external" href="https://docs.nextcloud.com/foo/bar.html">the documentation page about this ↗</a>.', - type: OC.SetupChecks.MESSAGE_TYPE_WARNING - }]); - done(); - }); - }); - */ it('should not return an error if the protocol is http and the server generates http links', function(done) { var async = OC.SetupChecks.checkSetup(); |