diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2017-03-16 14:08:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-16 14:08:32 +0100 |
commit | 793d7d1bd75ef1e35cc29aef5ac03dc95aa248bb (patch) | |
tree | 0ebfc0ae4c72f8e52338bd5a4826f9308c23e896 /core/js | |
parent | 57c1be8633103f2e2ca74bad186c332713f4ef83 (diff) | |
parent | bb2ec51bbb9170c1416cef8fdd072a7d6a58df6d (diff) | |
download | nextcloud-server-793d7d1bd75ef1e35cc29aef5ac03dc95aa248bb.tar.gz nextcloud-server-793d7d1bd75ef1e35cc29aef5ac03dc95aa248bb.zip |
Merge pull request #3860 from nextcloud/fix_master_after_3802
Fix unit tests of master
Diffstat (limited to 'core/js')
-rw-r--r-- | core/js/tests/specs/setupchecksSpec.js | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/core/js/tests/specs/setupchecksSpec.js b/core/js/tests/specs/setupchecksSpec.js index 1ee16a7af81..e18db4b7e57 100644 --- a/core/js/tests/specs/setupchecksSpec.js +++ b/core/js/tests/specs/setupchecksSpec.js @@ -156,6 +156,7 @@ describe('OC.SetupChecks tests', function() { isCorrectMemcachedPHPModuleInstalled: true, hasPassedCodeIntegrityCheck: true, isOpcacheProperlySetup: true, + isSettimelimitAvailable: true }) ); @@ -188,6 +189,7 @@ describe('OC.SetupChecks tests', function() { isCorrectMemcachedPHPModuleInstalled: true, hasPassedCodeIntegrityCheck: true, isOpcacheProperlySetup: true, + isSettimelimitAvailable: true }) ); @@ -221,6 +223,7 @@ describe('OC.SetupChecks tests', function() { isCorrectMemcachedPHPModuleInstalled: true, hasPassedCodeIntegrityCheck: true, isOpcacheProperlySetup: true, + isSettimelimitAvailable: true }) ); @@ -252,6 +255,7 @@ describe('OC.SetupChecks tests', function() { isCorrectMemcachedPHPModuleInstalled: true, hasPassedCodeIntegrityCheck: true, isOpcacheProperlySetup: true, + isSettimelimitAvailable: true }) ); @@ -281,6 +285,7 @@ describe('OC.SetupChecks tests', function() { isCorrectMemcachedPHPModuleInstalled: false, hasPassedCodeIntegrityCheck: true, isOpcacheProperlySetup: true, + isSettimelimitAvailable: true }) ); @@ -310,6 +315,7 @@ describe('OC.SetupChecks tests', function() { isCorrectMemcachedPHPModuleInstalled: true, hasPassedCodeIntegrityCheck: true, isOpcacheProperlySetup: true, + isSettimelimitAvailable: true }) ); @@ -322,6 +328,36 @@ describe('OC.SetupChecks tests', function() { }); }); + it('should return an error if set_time_limit is unavailable', function(done) { + var async = OC.SetupChecks.checkSetup(); + + suite.server.requests[0].respond( + 200, + { + 'Content-Type': 'application/json', + }, + JSON.stringify({ + isUrandomAvailable: true, + serverHasInternetConnection: true, + isMemcacheConfigured: true, + forwardedForHeadersWorking: true, + reverseProxyDocs: 'https://docs.owncloud.org/foo/bar.html', + isCorrectMemcachedPHPModuleInstalled: true, + hasPassedCodeIntegrityCheck: true, + isOpcacheProperlySetup: true, + isSettimelimitAvailable: false + }) + ); + + async.done(function( data, s, x ){ + expect(data).toEqual([{ + msg: 'The PHP function "set_time_limit" is not available. This could result in scripts being halted mid-execution, breaking your installation. We strongly recommend enabling this function.', + type: OC.SetupChecks.MESSAGE_TYPE_WARNING + }]); + done(); + }); + }); + it('should return an error if the response has no statuscode 200', function(done) { var async = OC.SetupChecks.checkSetup(); @@ -360,6 +396,7 @@ describe('OC.SetupChecks tests', function() { isCorrectMemcachedPHPModuleInstalled: true, hasPassedCodeIntegrityCheck: true, isOpcacheProperlySetup: true, + isSettimelimitAvailable: true }) ); @@ -390,6 +427,7 @@ describe('OC.SetupChecks tests', function() { hasPassedCodeIntegrityCheck: true, isOpcacheProperlySetup: false, phpOpcacheDocumentation: 'https://example.org/link/to/doc', + isSettimelimitAvailable: true }) ); |