diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-10-24 14:51:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-24 14:51:15 +0200 |
commit | df6e9109c8d2f4d461073a0e6f69d6fd7b67d0e3 (patch) | |
tree | 4148415b3f3d9261857e7e81b85efe278492a6f3 /core/js/tests | |
parent | 37718ddc0a82bf4207a56d5dc36b99667650a56e (diff) | |
parent | 20a5ce217a47c9e3d5dd4016e96e0cc557c51417 (diff) | |
download | nextcloud-server-df6e9109c8d2f4d461073a0e6f69d6fd7b67d0e3.tar.gz nextcloud-server-df6e9109c8d2f4d461073a0e6f69d6fd7b67d0e3.zip |
Merge pull request #11396 from nextcloud/wellknown-webfinger
adding .well-known/webfinger
Diffstat (limited to 'core/js/tests')
-rw-r--r-- | core/js/tests/specs/setupchecksSpec.js | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/core/js/tests/specs/setupchecksSpec.js b/core/js/tests/specs/setupchecksSpec.js index 3de1a4463b0..47443e5e727 100644 --- a/core/js/tests/specs/setupchecksSpec.js +++ b/core/js/tests/specs/setupchecksSpec.js @@ -61,8 +61,8 @@ 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', true); + it('should fail with another response status code than the expected one', function(done) { + var async = OC.SetupChecks.checkWellKnownUrl('/.well-known/caldav', 'http://example.org/PLACEHOLDER', true, 207); suite.server.requests[0].respond(200); @@ -75,7 +75,18 @@ describe('OC.SetupChecks tests', function() { }); }); - it('should return no error with a response status code of 207', function(done) { + it('should return no error with the expected response status code', function(done) { + var async = OC.SetupChecks.checkWellKnownUrl('/.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('/.well-known/caldav', 'http://example.org/PLACEHOLDER', true); suite.server.requests[0].respond(207); |