diff options
author | Morris Jobke <hey@morrisjobke.de> | 2016-01-08 22:32:11 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2016-01-08 23:27:29 +0100 |
commit | 0161928fc3a472c35fb571c732408f088292052d (patch) | |
tree | 7059312cf069500c8f1fc7fb06032c936aa0dc0f /core/js/tests | |
parent | a259effc7d22cfd686ac73744caf2ce209ac1f1f (diff) | |
download | nextcloud-server-0161928fc3a472c35fb571c732408f088292052d.tar.gz nextcloud-server-0161928fc3a472c35fb571c732408f088292052d.zip |
Add check for .well-known URL in the root of the webservers URL
* fixes #20012
Diffstat (limited to 'core/js/tests')
-rw-r--r-- | core/js/tests/specs/setupchecksSpec.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/core/js/tests/specs/setupchecksSpec.js b/core/js/tests/specs/setupchecksSpec.js index c5f1aa5effe..18ba44ac61b 100644 --- a/core/js/tests/specs/setupchecksSpec.js +++ b/core/js/tests/specs/setupchecksSpec.js @@ -60,6 +60,33 @@ describe('OC.SetupChecks tests', function() { }); }); + describe('checkWellKnownUrl', function() { + it('should fail with another response status code than 207', function(done) { + var async = OC.SetupChecks.checkWellKnownUrl('/.well-known/caldav/', 'http://example.org/PLACEHOLDER'); + + suite.server.requests[0].respond(200); + + async.done(function( data, s, x ){ + expect(data).toEqual([{ + msg: 'Your web server is not set up properly to resolve "/.well-known/caldav/". Further information can be found in our <a target="_blank" href="http://example.org/admin-setup-well-known-URL">documentation</a>.', + type: OC.SetupChecks.MESSAGE_TYPE_ERROR + }]); + done(); + }); + }); + + it('should return no error with a response status code of 207', function(done) { + var async = OC.SetupChecks.checkWebDAV('/.well-known/caldav/', 'http://example.org/PLACEHOLDER'); + + suite.server.requests[0].respond(207); + + 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(); |