feat(checkout): implement authentication guard for checkout route and add bank account service

This commit is contained in:
2026-07-03 14:07:57 -03:00
parent 0a2d999c00
commit 3971970975
8 changed files with 81 additions and 6 deletions

View File

@@ -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');
});
});