diff --git a/src/queries.spec.ts b/src/queries.spec.ts index 26772a0..49325e3 100644 --- a/src/queries.spec.ts +++ b/src/queries.spec.ts @@ -3,12 +3,12 @@ import { getBlock, getChain } from "./queries"; test("getBlock", () => { expect(getBlock(new URLSearchParams({ chain: "eth", block_number: "123" }))) - .toBe(`SELECT * FROM block WHERE (chain == 'eth' AND block_number == '123') ORDER BY block_number DESC LIMIT 1`); + .toBe(`SELECT * FROM blocks WHERE (chain == 'eth' AND block_number == '123') ORDER BY block_number DESC LIMIT 1`); expect(getBlock(new URLSearchParams({ chain: "eth", greater_or_equals_by_timestamp: '1438270048', less_or_equals_by_timestamp: '1438270083', limit: '3' }))) - .toBe(`SELECT * FROM block WHERE (toUnixTimestamp(timestamp) >= 1438270048 AND toUnixTimestamp(timestamp) <= 1438270083 AND chain == 'eth') ORDER BY block_number DESC LIMIT 3`); + .toBe(`SELECT * FROM blocks WHERE (toUnixTimestamp(timestamp) >= 1438270048 AND toUnixTimestamp(timestamp) <= 1438270083 AND chain == 'eth') ORDER BY block_number DESC LIMIT 3`); }); test("getChain", () => { - expect(getChain()).toBe(`SELECT DISTINCT chain FROM block`); + expect(getChain()).toBe(`SELECT DISTINCT chain FROM module_hashes`); }); \ No newline at end of file