Skip to content

Commit

Permalink
✅ Add tests for new pushToStart token
Browse files Browse the repository at this point in the history
  • Loading branch information
Clon1998 committed Mar 2, 2025
1 parent 3107c61 commit 1a0ed27
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test/live_activities_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,16 @@ class MockLiveActivitiesPlatform
}) {
return Future.value();
}

@override
Future<bool> allowsPushStart() {
return Future.value(true);
}

@override
Stream<String> get pushToStartTokenUpdateStream {
return Stream.value('PUSH_TO_START_TOKEN');
}
}

void main() {
Expand Down Expand Up @@ -190,4 +200,15 @@ void main() {

expect(correctMappingNotNull, 'ACTIVITY_TOKEN');
});

test('allowsPushStart', () async {
expect(await liveActivitiesPlugin.allowsPushStart(), true);
});

test('pushToStartTokenUpdateStream', () async {
expect(
await liveActivitiesPlugin.pushToStartTokenUpdateStream.first,
'PUSH_TO_START_TOKEN',
);
});
}

0 comments on commit 1a0ed27

Please sign in to comment.