Stabilize auth flow and profile images
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
import 'package:tdc114plus/src/features/directory/data/directory_repository.dart';
|
||||
import 'package:tdc114plus/src/features/directory/domain/employee.dart';
|
||||
|
||||
void main() {
|
||||
test('DirectoryQuery maps all tenant filter to nullable API parameters', () {
|
||||
const query = DirectoryQuery(query: ' 김하늘 ', tenantSlug: 'all');
|
||||
|
||||
expect(query.apiQuery, '김하늘');
|
||||
expect(query.apiTenantSlug, isNull);
|
||||
});
|
||||
|
||||
test('DirectoryQuery keeps selected tenant slug for API requests', () {
|
||||
const query = DirectoryQuery(query: '', tenantSlug: 'hanmac');
|
||||
|
||||
expect(query.apiQuery, isNull);
|
||||
expect(query.apiTenantSlug, 'hanmac');
|
||||
});
|
||||
|
||||
test('DirectoryRepository now focuses on employee lists only', () {
|
||||
const employees = [
|
||||
Employee(
|
||||
id: 'user-001',
|
||||
name: '김하늘',
|
||||
phoneNumber: '+821012345678',
|
||||
tenantId: 'tenant-hanmac',
|
||||
tenantName: '한맥',
|
||||
tenantSlug: 'hanmac',
|
||||
),
|
||||
];
|
||||
|
||||
expect(employees.single.name, '김하늘');
|
||||
expect(employees.single.tenantSlug, 'hanmac');
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user