feat(checkout): implement authentication guard for checkout route and add bank account service
This commit is contained in:
@@ -182,4 +182,16 @@ describe('app routes', () => {
|
||||
expect(compiled.querySelector('.tenant-status')).not.toBeNull();
|
||||
expect(compiled.textContent).toContain('No encontramos una tienda para este dominio');
|
||||
});
|
||||
|
||||
it('redirects unauthenticated users from /checkout to /login', async () => {
|
||||
const { router } = await renderAppAt('/checkout', createTenantServiceStub(), createAuthServiceStub(false));
|
||||
|
||||
expect(router.url).toBe('/login');
|
||||
});
|
||||
|
||||
it('allows authenticated users to access /checkout', async () => {
|
||||
const { router } = await renderAppAt('/checkout', createTenantServiceStub(), createAuthServiceStub(true));
|
||||
|
||||
expect(router.url).toBe('/checkout');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user