Files
TimeTracker/mobile/test/api_client_test.dart
T
Dries Peeters 9066089a34 Mobile: theme, login, sync, and launcher icons
- Align app theme with webapp (AppColors, light/dark ColorScheme); move to core/theme
- Add app config, theme mode provider, empty_state and error_view widgets
- Improve API client, sync service, and repository for time entries
- Add login screen, settings (theme toggle, logout), SSL utils for dev certs
- Android/iOS project config, Gradle wrapper, and generated launcher icons
- Add flutter_launcher_icons and icon assets (app_icon.png, README)

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-01 16:51:05 +01:00

22 lines
638 B
Dart

import 'package:flutter_test/flutter_test.dart';
import 'package:timetracker_mobile/data/api/api_client.dart';
void main() {
group('ApiClient', () {
test('initializes with base URL', () {
const baseUrl = 'https://example.com';
final client = ApiClient(baseUrl: baseUrl);
expect(client.baseUrl, 'https://example.com/');
});
test('validates token format', () {
// Token should start with 'tt_'
const validToken = 'tt_abc123';
const invalidToken = 'invalid_token';
expect(validToken.startsWith('tt_'), isTrue);
expect(invalidToken.startsWith('tt_'), isFalse);
});
});
}