Invitation is now also just a single route like password reset
This commit is contained in:
+2
-12
@@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user