1
0
forked from baron/baron-sso

테넌트 접근 제한 테스트 추가

This commit is contained in:
2026-04-28 10:58:14 +09:00
parent d0340fc062
commit 6be0914b65
2 changed files with 64 additions and 10 deletions

View File

@@ -0,0 +1,23 @@
import 'package:flutter_test/flutter_test.dart';
import 'package:userfront/core/services/auth_proxy_service.dart';
import 'package:userfront/features/auth/domain/consent_error_routing.dart';
void main() {
test('tenant_not_allowed consent error routes to dedicated error screen', () {
const error = AuthProxyException(
errorCode: 'tenant_not_allowed',
message: '허용되지 않은 테넌트입니다.',
);
expect(shouldRouteConsentErrorToErrorScreen(error), isTrue);
});
test('generic consent error stays on consent screen', () {
const error = AuthProxyException(
errorCode: 'forbidden',
message: '동의 정보를 가져오지 못했습니다.',
);
expect(shouldRouteConsentErrorToErrorScreen(error), isFalse);
});
}