summaryrefslogtreecommitdiffstats
path: root/core/js
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2017-12-13 12:53:12 +0100
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2017-12-13 17:22:58 +0100
commitee20741526eccc1a02ee48fea6d917d17c1cfe58 (patch)
tree1420bd413e5e253365b5285da4c1da3d825dfc1a /core/js
parent7618473a443aaa42d06391a134525d51a6912f39 (diff)
downloadnextcloud-server-ee20741526eccc1a02ee48fea6d917d17c1cfe58.tar.gz
nextcloud-server-ee20741526eccc1a02ee48fea6d917d17c1cfe58.zip
Add tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'core/js')
-rw-r--r--core/js/tests/specs/setupchecksSpec.js59
1 files changed, 50 insertions, 9 deletions
diff --git a/core/js/tests/specs/setupchecksSpec.js b/core/js/tests/specs/setupchecksSpec.js
index 0114f7d868f..00bc84f2a8f 100644
--- a/core/js/tests/specs/setupchecksSpec.js
+++ b/core/js/tests/specs/setupchecksSpec.js
@@ -156,7 +156,8 @@ describe('OC.SetupChecks tests', function() {
isCorrectMemcachedPHPModuleInstalled: true,
hasPassedCodeIntegrityCheck: true,
isOpcacheProperlySetup: true,
- isSettimelimitAvailable: true
+ isSettimelimitAvailable: true,
+ hasFreeTypeSupport: true
})
);
@@ -189,7 +190,8 @@ describe('OC.SetupChecks tests', function() {
isCorrectMemcachedPHPModuleInstalled: true,
hasPassedCodeIntegrityCheck: true,
isOpcacheProperlySetup: true,
- isSettimelimitAvailable: true
+ isSettimelimitAvailable: true,
+ hasFreeTypeSupport: true
})
);
@@ -223,7 +225,8 @@ describe('OC.SetupChecks tests', function() {
isCorrectMemcachedPHPModuleInstalled: true,
hasPassedCodeIntegrityCheck: true,
isOpcacheProperlySetup: true,
- isSettimelimitAvailable: true
+ isSettimelimitAvailable: true,
+ hasFreeTypeSupport: true
})
);
@@ -255,7 +258,8 @@ describe('OC.SetupChecks tests', function() {
isCorrectMemcachedPHPModuleInstalled: true,
hasPassedCodeIntegrityCheck: true,
isOpcacheProperlySetup: true,
- isSettimelimitAvailable: true
+ isSettimelimitAvailable: true,
+ hasFreeTypeSupport: true
})
);
@@ -285,7 +289,8 @@ describe('OC.SetupChecks tests', function() {
isCorrectMemcachedPHPModuleInstalled: false,
hasPassedCodeIntegrityCheck: true,
isOpcacheProperlySetup: true,
- isSettimelimitAvailable: true
+ isSettimelimitAvailable: true,
+ hasFreeTypeSupport: true
})
);
@@ -315,7 +320,8 @@ describe('OC.SetupChecks tests', function() {
isCorrectMemcachedPHPModuleInstalled: true,
hasPassedCodeIntegrityCheck: true,
isOpcacheProperlySetup: true,
- isSettimelimitAvailable: true
+ isSettimelimitAvailable: true,
+ hasFreeTypeSupport: true
})
);
@@ -345,7 +351,8 @@ describe('OC.SetupChecks tests', function() {
isCorrectMemcachedPHPModuleInstalled: true,
hasPassedCodeIntegrityCheck: true,
isOpcacheProperlySetup: true,
- isSettimelimitAvailable: false
+ isSettimelimitAvailable: false,
+ hasFreeTypeSupport: true
})
);
@@ -396,7 +403,8 @@ describe('OC.SetupChecks tests', function() {
isCorrectMemcachedPHPModuleInstalled: true,
hasPassedCodeIntegrityCheck: true,
isOpcacheProperlySetup: true,
- isSettimelimitAvailable: true
+ isSettimelimitAvailable: true,
+ hasFreeTypeSupport: true
})
);
@@ -427,7 +435,8 @@ describe('OC.SetupChecks tests', function() {
hasPassedCodeIntegrityCheck: true,
isOpcacheProperlySetup: false,
phpOpcacheDocumentation: 'https://example.org/link/to/doc',
- isSettimelimitAvailable: true
+ isSettimelimitAvailable: true,
+ hasFreeTypeSupport: true
})
);
@@ -439,6 +448,38 @@ describe('OC.SetupChecks tests', function() {
done();
});
});
+
+ it('should return an info if server has no freetype support', function(done) {
+ var async = OC.SetupChecks.checkSetup();
+
+ suite.server.requests[0].respond(
+ 200,
+ {
+ 'Content-Type': 'application/json'
+ },
+ JSON.stringify({
+ isUrandomAvailable: true,
+ securityDocs: 'https://docs.owncloud.org/myDocs.html',
+ serverHasInternetConnection: true,
+ isMemcacheConfigured: true,
+ forwardedForHeadersWorking: true,
+ isCorrectMemcachedPHPModuleInstalled: true,
+ hasPassedCodeIntegrityCheck: true,
+ isOpcacheProperlySetup: true,
+ phpOpcacheDocumentation: 'https://example.org/link/to/doc',
+ isSettimelimitAvailable: true,
+ hasFreeTypeSupport: false
+ })
+ );
+
+ async.done(function( data, s, x ){
+ expect(data).toEqual([{
+ msg: 'Your PHP does not have freetype support. This will result in broken profile pictures and settings interface.',
+ type: OC.SetupChecks.MESSAGE_TYPE_INFO
+ }]);
+ done();
+ });
+ });
});
describe('checkGeneric', function() {