fix: Email auth should allow same guest user on multiple subdomains (#2252)
* test: Add email auth tests to establish current state of system * fix: Update logic to account for dupe emails used between subdomains * test * test
This commit is contained in:
@ -68,6 +68,23 @@ export function buildEvent(overrides: Object = {}) {
|
||||
});
|
||||
}
|
||||
|
||||
export async function buildGuestUser(overrides: Object = {}) {
|
||||
if (!overrides.teamId) {
|
||||
const team = await buildTeam();
|
||||
overrides.teamId = team.id;
|
||||
}
|
||||
|
||||
count++;
|
||||
|
||||
return User.create({
|
||||
email: `user${count}@example.com`,
|
||||
name: `User ${count}`,
|
||||
createdAt: new Date("2018-01-01T00:00:00.000Z"),
|
||||
lastActiveAt: new Date("2018-01-01T00:00:00.000Z"),
|
||||
...overrides,
|
||||
});
|
||||
}
|
||||
|
||||
export async function buildUser(overrides: Object = {}) {
|
||||
if (!overrides.teamId) {
|
||||
const team = await buildTeam();
|
||||
|
Reference in New Issue
Block a user