mirror of
https://github.com/DRYTRIX/TimeTracker.git
synced 2026-05-17 18:38:46 -05:00
9066089a34
- 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>
22 lines
638 B
Dart
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);
|
|
});
|
|
});
|
|
}
|