Skip to content

Commit f1ee48a

Browse files
committed
fix(tests): update sql tests
1 parent 178a6a7 commit f1ee48a

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

test/services/database/strategies/HyperboardsQueryStrategy.test.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ describe("HyperboardsQueryStrategy", () => {
1616
it("should build a basic query without args", () => {
1717
const query = strategy.buildDataQuery(db);
1818
const { sql } = query.compile();
19-
expect(sql).toMatch(/select \* from "hyperboards"/i);
19+
expect(sql).toMatch(/select \* from "hyperboards_with_admins"/i);
2020
});
2121

2222
it("should build a query with collection filter", () => {
@@ -26,7 +26,9 @@ describe("HyperboardsQueryStrategy", () => {
2626
},
2727
});
2828
const { sql } = query.compile();
29-
expect(sql).toContain('select "hyperboards".* from "hyperboards"');
29+
expect(sql).toContain(
30+
'select "hyperboards_with_admins".* from "hyperboards_with_admins"',
31+
);
3032
});
3133

3234
it("should build a query with admin filter", () => {
@@ -36,15 +38,19 @@ describe("HyperboardsQueryStrategy", () => {
3638
},
3739
});
3840
const { sql } = query.compile();
39-
expect(sql).toContain('select "hyperboards".* from "hyperboards"');
41+
expect(sql).toContain(
42+
'select "hyperboards_with_admins".* from "hyperboards_with_admins"',
43+
);
4044
});
4145
});
4246

4347
describe("buildCountQuery", () => {
4448
it("should build a basic count query without args", () => {
4549
const query = strategy.buildCountQuery(db);
4650
const { sql } = query.compile();
47-
expect(sql).toMatch(/select count\(\*\) as "count" from "hyperboards"/i);
51+
expect(sql).toMatch(
52+
/select count\(\*\) as "count" from "hyperboards_with_admins"/i,
53+
);
4854
});
4955

5056
it("should build a count query with collection filter", () => {

test/services/graphql/resolvers/orderResolver.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ describe("OrderResolver", () => {
107107
expect(mockMarketplaceOrdersService.getOrders).toHaveBeenCalledWith(args);
108108
expect(mockHypercertService.getHypercerts).toHaveBeenCalledWith({
109109
where: {
110-
hypercert_id: { in: [mockOrder.hypercert_id?.toLowerCase()] },
110+
hypercert_id: { in: [mockOrder.hypercert_id] },
111111
},
112112
});
113113

0 commit comments

Comments
 (0)