Fixed tests

This commit is contained in:
2026-04-19 23:11:17 +02:00
parent 9a2afbfd3b
commit 653b85d28d
2 changed files with 7 additions and 9 deletions

View File

@@ -449,8 +449,8 @@ void main() {
);
test('getNameCount works correctly', () async {
final player2 = Player(name: testPlayer1.name, description: '');
final player3 = Player(name: testPlayer1.name, description: '');
final player2 = Player(name: testPlayer1.name);
final player3 = Player(name: testPlayer1.name);
await database.playerDao.addPlayersAsList(
players: [testPlayer1, player2, player3],
@@ -460,7 +460,7 @@ void main() {
name: testPlayer1.name,
);
expect(nameCount, 2);
expect(nameCount, 3);
});
test('updateNameCount works correctly', () async {
@@ -470,14 +470,12 @@ void main() {
playerId: testPlayer1.id,
nameCount: 2,
);
expect(success, true);
final nameCount = await database.playerDao.getNameCount(
name: testPlayer1.name,
final player = await database.playerDao.getPlayerById(
playerId: testPlayer1.id,
);
expect(nameCount, 2);
expect(player.nameCount, 2);
});
test('getPlayerWithHighestNameCount works correctly', () async {