mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix(emails): broken test due to sticky registration interstitial
This commit is contained in:
@@ -13,15 +13,15 @@ get:
|
|||||||
"200":
|
"200":
|
||||||
description: ""
|
description: ""
|
||||||
content:
|
content:
|
||||||
application/json:
|
text/plain:
|
||||||
schema:
|
schema:
|
||||||
allOf:
|
type: string
|
||||||
- $ref: ../../../../components/schemas/UserObject.yaml#/UserObjectFull
|
description: A relative path to the registration interstitial page so they can add or update an email for their account
|
||||||
- type: object
|
example: /register/complete
|
||||||
properties:
|
"302":
|
||||||
hasPassword:
|
description: Redirects the user to a registration interstitial page so they can add or update an email for their account
|
||||||
type: boolean
|
headers:
|
||||||
title:
|
Location:
|
||||||
type: string
|
schema:
|
||||||
- $ref: ../../../../components/schemas/Breadcrumbs.yaml#/Breadcrumbs
|
type: string
|
||||||
- $ref: ../../../../components/schemas/CommonProps.yaml#/CommonProps
|
example: /register/complete
|
||||||
12
test/api.js
12
test/api.js
@@ -466,6 +466,18 @@ describe('API', async () => {
|
|||||||
csrfToken = config.csrf_token;
|
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,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user