appstore: set utmSource during user registration
This commit is contained in:
+1
-1
@@ -100,7 +100,7 @@ async function registerUser(email, password) {
|
||||
assert.strictEqual(typeof password, 'string');
|
||||
|
||||
const [error, response] = await safe(superagent.post(`${settings.apiServerOrigin()}/api/v1/register_user`)
|
||||
.send({ email, password })
|
||||
.send({ email, password, utmSource: 'cloudron-dashboard' })
|
||||
.timeout(30 * 1000)
|
||||
.ok(() => true));
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ describe('Appstore Cloudron Registration API - existing user', function () {
|
||||
|
||||
it('can setup subscription', async function () {
|
||||
const scope1 = nock(settings.apiServerOrigin())
|
||||
.post('/api/v1/register_user', (body) => body.email && body.password)
|
||||
.post('/api/v1/register_user', (body) => body.email && body.password && body.utmSource)
|
||||
.reply(201, {});
|
||||
|
||||
const scope2 = nock(settings.apiServerOrigin())
|
||||
@@ -142,7 +142,7 @@ describe('Appstore Cloudron Registration API - new user signup', function () {
|
||||
|
||||
it('can setup subscription', async function () {
|
||||
const scope1 = nock(settings.apiServerOrigin())
|
||||
.post('/api/v1/register_user', (body) => body.email && body.password)
|
||||
.post('/api/v1/register_user', (body) => body.email && body.password && body.utmSource)
|
||||
.reply(201, {});
|
||||
|
||||
const scope2 = nock(settings.apiServerOrigin())
|
||||
|
||||
Reference in New Issue
Block a user