Skip to content

Commit

Permalink
fix: address PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jsgalarraga committed Jun 27, 2024
1 parent 88c7313 commit b2a19f9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ void main() {
).thenAnswer((_) async {});
});

test('updates the document in the database', () async {
test('creates a new document in the database', () async {
when(
() => dbClient.set('solvedWords', any()),
).thenAnswer((_) async {});
Expand Down
2 changes: 1 addition & 1 deletion api/test/routes/game/answer_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ void main() {
final response = await route.onRequest(requestContext);

expect(response.statusCode, HttpStatus.ok);
verifyNever(() => crosswordRepository.updateSolvedWordsCount('id'));
verifyNever(() => crosswordRepository.updateSolvedWordsCount(any()));
},
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ void main() {
when(solvedWordsCollection.snapshots)
.thenAnswer((_) => Stream.value(query));

final docs = [
for (var i = 0; i < wordNumber; i++) doc,
];
final docs = List.generate(wordNumber, (_) => doc);
when(() => query.size).thenReturn(wordNumber);
when(() => query.docs).thenReturn(docs);
}
Expand All @@ -61,10 +59,6 @@ void main() {
when(
() => boardInfoCollection.where('type', isEqualTo: 'total_words_count'),
).thenReturn(boardInfoCollection);
when(
() =>
boardInfoCollection.where('type', isEqualTo: 'solved_words_count'),
).thenReturn(boardInfoCollection);
when(
() => boardInfoCollection.where('type', isEqualTo: 'zoom_limit'),
).thenReturn(boardInfoCollection);
Expand Down

0 comments on commit b2a19f9

Please sign in to comment.