Added methods for multiple inserts to tests
Some checks failed
Pull Request Pipeline / test (pull_request) Failing after 2m6s
Pull Request Pipeline / lint (pull_request) Successful in 2m6s

This commit is contained in:
2025-11-20 23:49:57 +01:00
parent e512cbbf95
commit 8e63a01705
3 changed files with 3 additions and 9 deletions

View File

@@ -94,10 +94,8 @@ void main() {
} }
}); });
// TODO: Use upcoming addGames() method
test('Adding and fetching multiple games works correclty', () async { test('Adding and fetching multiple games works correclty', () async {
await database.gameDao.addGame(game: testgame); await database.gameDao.addGames(games: [testgame, testgame2]);
await database.gameDao.addGame(game: testgame2);
final allGames = await database.gameDao.getAllGames(); final allGames = await database.gameDao.getAllGames();
expect(allGames.length, 2); expect(allGames.length, 2);

View File

@@ -68,10 +68,8 @@ void main() {
} }
}); });
// TODO: Use upcoming addGroups() method
test('Adding and fetching a single group works correctly', () async { test('Adding and fetching a single group works correctly', () async {
await database.groupDao.addGroup(group: testgroup); await database.groupDao.addGroups(groups: [testgroup, testgroup2]);
await database.groupDao.addGroup(group: testgroup2);
final allGroups = await database.groupDao.getAllGroups(); final allGroups = await database.groupDao.getAllGroups();
expect(allGroups.length, 2); expect(allGroups.length, 2);

View File

@@ -51,10 +51,8 @@ void main() {
expect(fetchedPlayer2.createdAt, testPlayer2.createdAt); expect(fetchedPlayer2.createdAt, testPlayer2.createdAt);
}); });
// TODO: Use upcoming addPlayers() method
test('Adding and fetching multiple players works correclty', () async { test('Adding and fetching multiple players works correclty', () async {
await database.playerDao.addPlayer(player: testPlayer); await database.playerDao.addPlayers(players: [testPlayer, testPlayer2]);
await database.playerDao.addPlayer(player: testPlayer2);
final allPlayers = await database.playerDao.getAllPlayers(); final allPlayers = await database.playerDao.getAllPlayers();
expect(allPlayers.length, 2); expect(allPlayers.length, 2);