mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-06-19 13:21:46 +00:00
fix(tests): update tests for granular auth toggles
- Add new fields to AppConfig type and buildAppConfig factory - Update FE-PAGE-ADMIN-018: heading changed to "Authentication Methods" - Update FE-PAGE-ADMIN-053: oidc_only toggle removed from OIDC panel - Update FE-PAGE-LOGIN-007/017: mocks now include password_login/oidc_login - Update ADMIN-SVC-049: updateOidcSettings no longer writes oidc_only
This commit is contained in:
@@ -471,14 +471,11 @@ describe('OIDC Settings', () => {
|
||||
expect(result.client_id).toBe('my-client');
|
||||
});
|
||||
|
||||
it('ADMIN-SVC-049 — updateOidcSettings sets oidc_only flag correctly', () => {
|
||||
updateOidcSettings({ oidc_only: true });
|
||||
const enabled = getOidcSettings() as any;
|
||||
expect(enabled.oidc_only).toBe(true);
|
||||
|
||||
updateOidcSettings({ oidc_only: false });
|
||||
const disabled = getOidcSettings() as any;
|
||||
expect(disabled.oidc_only).toBe(false);
|
||||
it('ADMIN-SVC-049 — updateOidcSettings does not write oidc_only (replaced by granular toggles)', () => {
|
||||
updateOidcSettings({ issuer: 'https://auth.example.com', client_id: 'my-client' });
|
||||
const result = getOidcSettings() as any;
|
||||
// oidc_only is no longer managed by updateOidcSettings; use password_login/oidc_login toggles
|
||||
expect(result.oidc_only).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user