Skip to content

Commit

Permalink
test: map doubt player correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
hmartiins committed Jan 5, 2025
1 parent fb49f30 commit 24a0b4a
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test/presentation/rx/next_event_rx_presenter_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ final class NextEventRxPresenter {
NextEventPlayerViewModel(
name: player.name,
initials: player.initials,
photo: player.photo,
position: player.position,
);
}

Expand Down Expand Up @@ -145,4 +147,23 @@ void main() {
});
await sut.loadNextEvent(groupId: groupId);
});

test('should map doubt player', () async {
final player = NextEventPlayer(
id: anyString(),
name: anyString(),
isConfirmed: anyBool(),
photo: anyString(),
position: anyString(),
);
nextEventLoader.simulatePlayers([player]);
sut.nextEventStream.listen((event) {
expect(event.doubt[0].name, player.name);
expect(event.doubt[0].initials, player.initials);
expect(event.doubt[0].photo, player.photo);
expect(event.doubt[0].position, player.position);
expect(event.doubt[0].isConfirmed, null);
});
await sut.loadNextEvent(groupId: groupId);
});
}

0 comments on commit 24a0b4a

Please sign in to comment.