halkyon/packages/halkyon_app/test/instance/flag_icons_license_test.dart

27 lines
830 B
Dart
Raw Normal View History

import 'package:flutter/foundation.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:halkyon_app/halkyon_app.dart';
void main() {
TestWidgetsFlutterBinding.ensureInitialized();
test("the flags' MIT notice joins the licence list, as their licence "
'asks', () async {
registerFlagIconsLicense();
final notices = [
await for (final entry in LicenseRegistry.licenses)
if (entry.packages.contains('flag-icons'))
entry.paragraphs.map((paragraph) => paragraph.text).join('\n'),
];
expect(notices, hasLength(1));
expect(notices.single, contains('Copyright (c) 2013 Panayiotis Lipiridis'));
expect(
notices.single,
contains(
'The above copyright notice and this permission notice shall be '
'included',
),
);
});
}