Skip to content

Commit e10e816

Browse files
committed
add a test for wasEmailTestSuccessful
Signed-off-by: szaimen <szaimen@e.mail.de>
1 parent 7713f46 commit e10e816

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

core/js/tests/specs/setupchecksSpec.js

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,62 @@ describe('OC.SetupChecks tests', function() {
497497
});
498498
});
499499

500+
it('should return an info if the mail server config was not set or verified, yet', function(done) {
501+
var async = OC.SetupChecks.checkSetup();
502+
503+
suite.server.requests[0].respond(
504+
200,
505+
{
506+
'Content-Type': 'application/json'
507+
},
508+
JSON.stringify({
509+
hasFileinfoInstalled: true,
510+
isGetenvServerWorking: true,
511+
isReadOnlyConfig: false,
512+
wasEmailTestSuccessful: false,
513+
hasWorkingFileLocking: true,
514+
hasValidTransactionIsolationLevel: true,
515+
suggestedOverwriteCliURL: '',
516+
isRandomnessSecure: true,
517+
securityDocs: 'https://docs.nextcloud.com/myDocs.html',
518+
isFairUseOfFreePushService: true,
519+
serverHasInternetConnectionProblems: false,
520+
isMemcacheConfigured: true,
521+
forwardedForHeadersWorking: true,
522+
isCorrectMemcachedPHPModuleInstalled: true,
523+
hasPassedCodeIntegrityCheck: true,
524+
OpcacheSetupRecommendations: [],
525+
phpOpcacheDocumentation: 'https://example.org/link/to/doc',
526+
isSettimelimitAvailable: true,
527+
hasFreeTypeSupport: true,
528+
missingIndexes: [],
529+
missingPrimaryKeys: [],
530+
missingColumns: [],
531+
cronErrors: [],
532+
cronInfo: {
533+
diffInSeconds: 0
534+
},
535+
isMemoryLimitSufficient: true,
536+
appDirsWithDifferentOwner: [],
537+
recommendedPHPModules: [],
538+
pendingBigIntConversionColumns: [],
539+
isMysqlUsedWithoutUTF8MB4: false,
540+
isDefaultPhoneRegionSet: true,
541+
isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true,
542+
reverseProxyGeneratedURL: 'https://server',
543+
temporaryDirectoryWritable: true,
544+
})
545+
);
546+
547+
async.done(function( data, s, x ){
548+
expect(data).toEqual([{
549+
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.',
550+
type: OC.SetupChecks.MESSAGE_TYPE_INFO
551+
}]);
552+
done();
553+
});
554+
});
555+
500556
it('should return a warning if there are app directories with wrong permissions', function(done) {
501557
var async = OC.SetupChecks.checkSetup();
502558

0 commit comments

Comments
 (0)