Skip to content

Commit

Permalink
test: fix tests after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
starsirius committed Dec 3, 2024
1 parent 1688ffc commit 2e44c56
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions src/schema/v2/artwork/__tests__/artwork.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5262,15 +5262,14 @@ describe("Artwork type", () => {
describe("runningShow", () => {
it("returns the show or fair if the artwork id is in a running show or fair", async () => {
artwork.purchasable = true
context.relatedShowsLoader.mockResolvedValue({
body: [
{
name: "Test Show",
start_at: "2023-01-01T00:00:00Z",
end_at: "2023-01-02T00:00:00Z",
},
],
})
artwork.show_ids = ["show-id"]
context.showsLoader.mockResolvedValue([
{
name: "Test Show",
start_at: "2023-01-01T00:00:00Z",
end_at: "2023-01-02T00:00:00Z",
},
])

const data = await runQuery(query, context)
expect(data.artwork.collectorSignals.runningShow).toEqual({
Expand All @@ -5282,7 +5281,7 @@ describe("Artwork type", () => {

it("returns null if the artwork id is not in a running show or fair", async () => {
artwork.purchasable = true
context.relatedShowsLoader.mockResolvedValue({ body: [] })
context.showsLoader.mockResolvedValue([])

const data = await runQuery(query, context)
expect(data.artwork.collectorSignals.runningShow).toBeNull()
Expand Down

0 comments on commit 2e44c56

Please sign in to comment.