Use MyQuran Hijri calendar API for displayed date
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:jamshalat_masjid_screen/core/enums.dart';
|
||||
import 'package:jamshalat_masjid_screen/data/local/models.dart';
|
||||
import 'package:jamshalat_masjid_screen/data/services/hijri_service.dart';
|
||||
|
||||
void main() {
|
||||
group('PrayerName display labels', () {
|
||||
@@ -37,4 +38,22 @@ void main() {
|
||||
expect(updated.runningTexts, settings.runningTexts);
|
||||
});
|
||||
});
|
||||
|
||||
group('HijriCalendarService parsing', () {
|
||||
test('extracts hijri label from MyQuran calendar response', () {
|
||||
final label = HijriCalendarService.parseHijriLabel({
|
||||
'status': true,
|
||||
'data': {
|
||||
'hijr': {
|
||||
'today': 'Senin, 11 Syawal 1447 H',
|
||||
'day': 11,
|
||||
'monthName': 'Syawal',
|
||||
'year': 1447,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
expect(label, '11 Syawal 1447 H');
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user