Skip to content

Commit fd217be

Browse files
committed
Regression test #1649
1 parent e60901d commit fd217be

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

spec/index.spec.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,4 +361,26 @@ describe('server', () => {
361361
expect(() => setServerConfiguration({ revokeSessionOnPasswordReset: 'non-bool' })).toThrow();
362362
done();
363363
});
364+
365+
it('fails if you set verifyUserEmails to true without setting an app ID or publicServerURL (regression test for #1649)', done => {
366+
expect(() => setServerConfiguration({
367+
serverURL: 'http://localhost:8378/1',
368+
appId: 'test',
369+
appName: 'unused',
370+
javascriptKey: 'test',
371+
dotNetKey: 'windows',
372+
clientKey: 'client',
373+
restAPIKey: 'rest',
374+
masterKey: 'test',
375+
collectionPrefix: 'test_',
376+
fileKey: 'test',
377+
verifyUserEmails: true,
378+
emailAdapter: MockEmailAdapterWithOptions({
379+
fromAddress: '[email protected]',
380+
apiKey: 'k',
381+
domain: 'd',
382+
}),
383+
})).toThrow('A public server url is required when using email verification.');
384+
done();
385+
});
364386
});

0 commit comments

Comments
 (0)