Skip to content

Commit

Permalink
test: expect to call when the player create
Browse files Browse the repository at this point in the history
  • Loading branch information
jackwill99 committed Aug 28, 2024
1 parent 57d3794 commit ab5a6db
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/audioplayers/test/audioplayers_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ void main() {
expect(player.source, null);
await player.creatingCompleter.future;
expect(platform.popCall().method, 'create');
expect(platform.popCall().method, 'setAllowsExternalPlayback');
expect(platform.popLastCall().method, 'getEventStream');
return player;
}
Expand Down
3 changes: 2 additions & 1 deletion packages/audioplayers/test/fake_audioplayers_platform.dart
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ class FakeAudioplayersPlatform extends AudioplayersPlatformInterface {
String playerId, {
required bool allows,
}) async {
calls.add(FakeCall(id: playerId, method: 'setAllowsExternalPlayback'));
calls.add(FakeCall(
id: playerId, method: 'setAllowsExternalPlayback', value: allows));
}
}

0 comments on commit ab5a6db

Please sign in to comment.