Invitation is now also just a single route like password reset

This commit is contained in:
Johannes Zellner
2021-09-16 14:56:10 +02:00
parent 074ce574dd
commit 6785253377
4 changed files with 18 additions and 58 deletions
+2 -12
View File
@@ -522,20 +522,10 @@ describe('User', function () {
describe('invite', function () {
before(createOwner);
it('fails as expected', async function () {
const [error] = await safe(users.sendInvite(admin, { }));
expect(error.reason).to.be(BoxError.CONFLICT);
});
it('can create token', async function () {
const { resetToken, inviteLink } = await users.createInvite(admin, auditSource);
expect(resetToken).to.be.ok();
expect(inviteLink).to.be.ok();
});
it('send invite', async function () {
await clearMailQueue();
await users.sendInvite(admin, {});
const inviteLink = await users.sendInvite(admin, {});
expect(inviteLink).to.be.ok();
await checkMails(1);
});
});