Skip to content

Commit c121a93

Browse files
authored
Fix contract test mock for vote comic lookup
1 parent da8dafb commit c121a93

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

scripts/test-api-contracts.mjs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,11 @@ class MockDB {
8181
return { total: this.comics.length };
8282
}
8383

84-
if (sql.includes('SELECT day FROM comics WHERE day = ?')) {
84+
if (sql.includes('SELECT day, model_a, model_b FROM comics WHERE day = ?')) {
8585
const comic = this.comics.find((item) => item.day === params[0]);
86-
return comic ? { day: comic.day } : null;
86+
return comic
87+
? { day: comic.day, model_a: comic.model_a, model_b: comic.model_b }
88+
: null;
8789
}
8890

8991
if (sql.includes('SELECT day, r2_key_a, r2_key_b FROM comics WHERE day = ?')) {

0 commit comments

Comments
 (0)