fix(emails): broken test due to sticky registration interstitial

v1.18.x
Julian Lam 4 years ago
parent a3a3b10fb3
commit ab9b671693

@ -13,15 +13,15 @@ get:
"200":
description: ""
content:
application/json:
text/plain:
schema:
allOf:
- $ref: ../../../../components/schemas/UserObject.yaml#/UserObjectFull
- type: object
properties:
hasPassword:
type: boolean
title:
type: string
- $ref: ../../../../components/schemas/Breadcrumbs.yaml#/Breadcrumbs
- $ref: ../../../../components/schemas/CommonProps.yaml#/CommonProps
type: string
description: A relative path to the registration interstitial page so they can add or update an email for their account
example: /register/complete
"302":
description: Redirects the user to a registration interstitial page so they can add or update an email for their account
headers:
Location:
schema:
type: string
example: /register/complete

@ -466,6 +466,18 @@ describe('API', async () => {
csrfToken = config.csrf_token;
}
});
it('should back out of a registration interstitial if needed', async () => {
const affectedPaths = ['GET /api/user/{userslug}/edit/email'];
if (affectedPaths.includes(`${method.toUpperCase()} ${path}`)) {
await request({
uri: `${nconf.get('url')}/register/abort`,
method: 'POST',
jar,
simple: false,
});
}
});
});
});
}

Loading…
Cancel
Save