summaryrefslogtreecommitdiffstats
path: root/core/js/tests
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-01-12 14:46:09 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2016-01-12 14:46:09 +0100
commit2493cfede92c472c29cffc098206b8cdb7a2ca30 (patch)
tree781eea83cdf925fd93384205c89e8a8be9d494eb /core/js/tests
parent4fc0fbe8d04b7b89ffe1c3b79621ebe12b2057be (diff)
parent8b6b042ffde9490c24a1689919dbc6678381239c (diff)
downloadnextcloud-server-2493cfede92c472c29cffc098206b8cdb7a2ca30.tar.gz
nextcloud-server-2493cfede92c472c29cffc098206b8cdb7a2ca30.zip
Merge pull request #21640 from owncloud/add-config-to-disable-wellknown-check
Add config switch to disable the .well-known URL check
Diffstat (limited to 'core/js/tests')
-rw-r--r--core/js/tests/specs/setupchecksSpec.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/core/js/tests/specs/setupchecksSpec.js b/core/js/tests/specs/setupchecksSpec.js
index 434b30a41b7..bb5d6d3881f 100644
--- a/core/js/tests/specs/setupchecksSpec.js
+++ b/core/js/tests/specs/setupchecksSpec.js
@@ -62,7 +62,7 @@ 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');
+ var async = OC.SetupChecks.checkWellKnownUrl('/.well-known/caldav/', 'http://example.org/PLACEHOLDER', true);
suite.server.requests[0].respond(200);
@@ -76,7 +76,7 @@ describe('OC.SetupChecks tests', function() {
});
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');
+ var async = OC.SetupChecks.checkWellKnownUrl('/.well-known/caldav/', 'http://example.org/PLACEHOLDER', true);
suite.server.requests[0].respond(207);
@@ -85,6 +85,15 @@ describe('OC.SetupChecks tests', function() {
done();
});
});
+
+ it('should return no error when no check should be run', function(done) {
+ var async = OC.SetupChecks.checkWellKnownUrl('/.well-known/caldav/', 'http://example.org/PLACEHOLDER', false);
+
+ async.done(function( data, s, x ){
+ expect(data).toEqual([]);
+ done();
+ });
+ });
});
describe('checkSetup', function() {