mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-07-15 07:56:11 +08:00

For now I've mostly tried to follow the same style guide as the flutter repository, with many options disabled. Eventually, maybe it would make sense to be far stricter.
21 lines
535 B
Dart
21 lines
535 B
Dart
import 'package:journal/datetime_utils.dart';
|
|
import 'package:test/test.dart';
|
|
|
|
void main() {
|
|
group('DateTime Utils', () {
|
|
test('Test random date', () {
|
|
var dateTime = DateTime.utc(2011, 12, 23, 10, 15, 30);
|
|
var str = toIso8601WithTimezone(dateTime);
|
|
|
|
expect(str, "2011-12-23T10:15:30+00:00");
|
|
});
|
|
|
|
test('Test with small date', () {
|
|
var dateTime = DateTime.utc(2011, 6, 6, 5, 5, 3);
|
|
var str = toIso8601WithTimezone(dateTime);
|
|
|
|
expect(str, "2011-06-06T05:05:03+00:00");
|
|
});
|
|
});
|
|
}
|