1
0
Fork 0
forked from OpenNeo/impress
impress/src/server/query-tests/SpeciesColorPair.test.js
2020-04-25 23:03:58 -07:00

31 lines
655 B
JavaScript

const gql = require("graphql-tag");
const { query, getDbCalls } = require("./setup.js");
describe("SpeciesColorPair", () => {
it("gets them all", async () => {
const res = await query({
query: gql`
query {
allValidSpeciesColorPairs {
color {
id
}
species {
id
}
}
}
`,
});
expect(res).toHaveNoErrors();
expect(res.data).toMatchSnapshot();
expect(getDbCalls()).toMatchInlineSnapshot(`
Array [
Array [
"SELECT species_id, color_id FROM pet_types",
],
]
`);
});
});