Skip to content

Commit dffe795

Browse files
committed
fix: test case
1 parent 1f073e0 commit dffe795

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/core/src/middleware/koa-consent-guard.test.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ describe('koaConsentGuard middleware', () => {
4949

5050
await guard(ctx, next);
5151
expect(tenant.queries.users.findUserById).not.toHaveBeenCalled();
52-
expect(tenant.libraries.oneTimeTokens.verifyOneTimeToken).not.toHaveBeenCalled();
5352
expect(next).toHaveBeenCalled();
5453
});
5554

@@ -65,7 +64,9 @@ describe('koaConsentGuard middleware', () => {
6564
const guard = koaConsentGuard(provider, tenant.libraries, tenant.queries);
6665

6766
await guard(ctx, jest.fn());
68-
expect(ctx.redirect).toHaveBeenCalledWith(expect.stringContaining('switch-account'));
67+
expect(ctx.redirect).toHaveBeenCalledWith(
68+
expect.stringContaining('switch-account?login_hint=bar%40example.com&one_time_token=abcdefg')
69+
);
6970
});
7071

7172
it('should call next middleware if validations pass', async () => {

0 commit comments

Comments
 (0)