fix: auth token handling, add tests

- Read bearer token from set-auth-token header
- Add mounted checks to prevent setState after dispose
- Add mocktail for testing
- Add widget tests for login, clients, events screens
- Add unit tests for auth provider, API client
- 110 tests passing
This commit is contained in:
2026-01-27 22:12:33 +00:00
parent ce6e7598dd
commit 517b25468c
12 changed files with 1125 additions and 109 deletions

View File

@@ -103,9 +103,8 @@ void main() {
expect(clients.isEmpty, isTrue);
});
});
}
group('Client Form Validation', () {
group('Client Form Validation', () {
test('first name is required', () {
final firstName = '';
final isValid = firstName.isNotEmpty;
@@ -156,4 +155,5 @@ group('Client Form Validation', () {
expect(phone.isNotEmpty, isTrue);
}
});
});
});
}