aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-07-11 22:02:45 +0200
committerMorris Jobke <hey@morrisjobke.de>2018-07-11 22:02:45 +0200
commit83b1de4493befc2e17783976b6aa6a716718a305 (patch)
treea6fe67dd6883919f505c0126d71bf044952bfba4
parent3036b1d03d93267ff7fdda7a1e0682173aec2b98 (diff)
downloadnextcloud-server-83b1de4493befc2e17783976b6aa6a716718a305.tar.gz
nextcloud-server-83b1de4493befc2e17783976b6aa6a716718a305.zip
Fix unit tests - follow up to #10197
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
-rw-r--r--core/js/tests/specs/setupchecksSpec.js47
1 files changed, 15 insertions, 32 deletions
diff --git a/core/js/tests/specs/setupchecksSpec.js b/core/js/tests/specs/setupchecksSpec.js
index 894099bee32..e22fb35102e 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. <a target="_blank" rel="noreferrer noopener" href="https://example.org/link/to/doc">For better performance it is recommended</a> to load it into your PHP installation.',
+ msg: 'The PHP OPcache module is not loaded. <a href="https://example.org/link/to/doc" rel="noreferrer noopener">For better performance it is recommended</a> to load it into your PHP installation.',
type: OC.SetupChecks.MESSAGE_TYPE_INFO
}]);
done();