mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-09-01 09:44:07 +00:00
Some checks are pending
Flutter analyze & test / flutter_analyze_and_test (push) Waiting to run
24 lines
845 B
Dart
24 lines
845 B
Dart
import 'package:flutter_test/flutter_test.dart';
|
|
import 'package:twonly/src/services/notifications/native.notifications.dart';
|
|
|
|
void main() {
|
|
test('text notifications open their conversation', () {
|
|
expect(NativeNotificationService.opensConversation('text'), isTrue);
|
|
expect(NativeNotificationService.opensConversation('response'), isTrue);
|
|
});
|
|
|
|
test('media notifications stay on the chat overview', () {
|
|
for (final kind in ['twonly', 'image', 'video', 'audio']) {
|
|
expect(
|
|
NativeNotificationService.opensConversation(kind),
|
|
isFalse,
|
|
reason: kind,
|
|
);
|
|
}
|
|
});
|
|
|
|
test('missing and non-message kinds stay on the chat overview', () {
|
|
expect(NativeNotificationService.opensConversation(null), isFalse);
|
|
expect(NativeNotificationService.opensConversation('reaction'), isFalse);
|
|
});
|
|
}
|