From 83b1de4493befc2e17783976b6aa6a716718a305 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Wed, 11 Jul 2018 22:02:45 +0200 Subject: [PATCH] Fix unit tests - follow up to #10197 Signed-off-by: Morris Jobke --- core/js/tests/specs/setupchecksSpec.js | 47 ++++++++------------------ 1 file changed, 15 insertions(+), 32 deletions(-) diff --git a/core/js/tests/specs/setupchecksSpec.js b/core/js/tests/specs/setupchecksSpec.js index 894099bee3..e22fb35102 100644 --- a/core/js/tests/specs/setupchecksSpec.js +++ b/core/js/tests/specs/setupchecksSpec.js @@ -103,36 +103,7 @@ describe('OC.SetupChecks tests', function() { it('should return an error if data directory is not protected', function(done) { var async = OC.SetupChecks.checkDataProtected(); - suite.server.requests[0].respond( - 200, - { - 'Content-Type': 'application/json' - }, - JSON.stringify({ - hasFileinfoInstalled: true, - isGetenvServerWorking: true, - isReadOnlyConfig: false, - hasWorkingFileLocking: true, - hasValidTransactionIsolationLevel: true, - suggestedOverwriteCliURL: '', - isUrandomAvailable: true, - serverHasInternetConnection: false, - memcacheDocs: 'https://docs.nextcloud.com/server/go.php?to=admin-performance', - forwardedForHeadersWorking: true, - isCorrectMemcachedPHPModuleInstalled: true, - hasPassedCodeIntegrityCheck: true, - isOpcacheProperlySetup: true, - hasOpcacheLoaded: false, - isSettimelimitAvailable: true, - hasFreeTypeSupport: true, - missingIndexes: [], - outdatedCaches: [], - cronErrors: [], - cronInfo: { - diffInSeconds: 0 - } - }) - ); + suite.server.requests[0].respond(200, {'Content-Type': 'text/plain'}, ''); async.done(function( data, s, x ){ expect(data).toEqual([ @@ -604,6 +575,12 @@ describe('OC.SetupChecks tests', function() { 'Content-Type': 'application/json' }, JSON.stringify({ + hasFileinfoInstalled: true, + isGetenvServerWorking: true, + isReadOnlyConfig: false, + hasWorkingFileLocking: true, + hasValidTransactionIsolationLevel: true, + suggestedOverwriteCliURL: '', isUrandomAvailable: true, securityDocs: 'https://docs.owncloud.org/myDocs.html', serverHasInternetConnection: true, @@ -615,13 +592,19 @@ describe('OC.SetupChecks tests', function() { hasOpcacheLoaded: false, phpOpcacheDocumentation: 'https://example.org/link/to/doc', isSettimelimitAvailable: true, - hasFreeTypeSupport: true + hasFreeTypeSupport: true, + missingIndexes: [], + outdatedCaches: [], + cronErrors: [], + cronInfo: { + diffInSeconds: 0 + } }) ); async.done(function( data, s, x ){ expect(data).toEqual([{ - msg: 'The PHP OPcache module is not loaded. For better performance it is recommended to load it into your PHP installation.', + msg: 'The PHP OPcache module is not loaded. For better performance it is recommended to load it into your PHP installation.', type: OC.SetupChecks.MESSAGE_TYPE_INFO }]); done();