]> source.dussan.org Git - nextcloud-server.git/commitdiff
add a test for wasEmailTestSuccessful 30987/head
authorszaimen <szaimen@e.mail.de>
Thu, 3 Feb 2022 14:19:29 +0000 (15:19 +0100)
committerszaimen <szaimen@e.mail.de>
Thu, 3 Feb 2022 19:41:12 +0000 (20:41 +0100)
Signed-off-by: szaimen <szaimen@e.mail.de>
core/js/tests/specs/setupchecksSpec.js

index a226cb925017614b6b0ddc731a12639af7bd022c..cfadcef674651c7d142b562831ba1f3e2860b1d5 100644 (file)
@@ -497,6 +497,62 @@ describe('OC.SetupChecks tests', function() {
                        });
                });
 
+               it('should return an info if the mail server config was not set or verified, yet', function(done) {
+                       var async = OC.SetupChecks.checkSetup();
+
+                       suite.server.requests[0].respond(
+                               200,
+                               {
+                                       'Content-Type': 'application/json'
+                               },
+                               JSON.stringify({
+                                       hasFileinfoInstalled: true,
+                                       isGetenvServerWorking: true,
+                                       isReadOnlyConfig: false,
+                                       wasEmailTestSuccessful: false,
+                                       hasWorkingFileLocking: true,
+                                       hasValidTransactionIsolationLevel: true,
+                                       suggestedOverwriteCliURL: '',
+                                       isRandomnessSecure: true,
+                                       securityDocs: 'https://docs.nextcloud.com/myDocs.html',
+                                       isFairUseOfFreePushService: true,
+                                       serverHasInternetConnectionProblems: false,
+                                       isMemcacheConfigured: true,
+                                       forwardedForHeadersWorking: true,
+                                       isCorrectMemcachedPHPModuleInstalled: true,
+                                       hasPassedCodeIntegrityCheck: true,
+                                       OpcacheSetupRecommendations: [],
+                                       phpOpcacheDocumentation: 'https://example.org/link/to/doc',
+                                       isSettimelimitAvailable: true,
+                                       hasFreeTypeSupport: true,
+                                       missingIndexes: [],
+                                       missingPrimaryKeys: [],
+                                       missingColumns: [],
+                                       cronErrors: [],
+                                       cronInfo: {
+                                               diffInSeconds: 0
+                                       },
+                                       isMemoryLimitSufficient: true,
+                                       appDirsWithDifferentOwner: [],
+                                       recommendedPHPModules: [],
+                                       pendingBigIntConversionColumns: [],
+                                       isMysqlUsedWithoutUTF8MB4: false,
+                                       isDefaultPhoneRegionSet: true,
+                                       isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true,
+                                       reverseProxyGeneratedURL: 'https://server',
+                                       temporaryDirectoryWritable: true,
+                               })
+                       );
+
+                       async.done(function( data, s, x ){
+                               expect(data).toEqual([{
+                                       msg: 'You have not set or verified your email server configuration, yet. Please head over to the <a href="http://localhost/index.php/settings/admin">Basic settings</a> in order to set them. Afterwards, use the "Send email" button below the form to verify your settings.',
+                                       type: OC.SetupChecks.MESSAGE_TYPE_INFO
+                               }]);
+                               done();
+                       });
+               });
+
                it('should return a warning if there are app directories with wrong permissions', function(done) {
                        var async = OC.SetupChecks.checkSetup();