From 19b046209c8c7c9264d35669b0c9e2668489886a Mon Sep 17 00:00:00 2001 From: Drew Gross Date: Tue, 26 Apr 2016 16:50:42 -0700 Subject: [PATCH] Regression test #1649 --- spec/index.spec.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/spec/index.spec.js b/spec/index.spec.js index d0d54401b1c..a7cc1a7a4fb 100644 --- a/spec/index.spec.js +++ b/spec/index.spec.js @@ -361,4 +361,26 @@ describe('server', () => { expect(() => setServerConfiguration({ revokeSessionOnPasswordReset: 'non-bool' })).toThrow(); done(); }); + + it('fails if you set verifyUserEmails to true without setting an app ID or publicServerURL (regression test for #1649)', done => { + expect(() => setServerConfiguration({ + serverURL: 'http://localhost:8378/1', + appId: 'test', + appName: 'unused', + javascriptKey: 'test', + dotNetKey: 'windows', + clientKey: 'client', + restAPIKey: 'rest', + masterKey: 'test', + collectionPrefix: 'test_', + fileKey: 'test', + verifyUserEmails: true, + emailAdapter: MockEmailAdapterWithOptions({ + fromAddress: 'parse@example.com', + apiKey: 'k', + domain: 'd', + }), + })).toThrow('A public server url is required when using email verification.'); + done(); + }); });