Skip to content

Commit

Permalink
fix: integration test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ZavenArra committed Feb 2, 2022
1 parent 811472c commit f1e24f9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions server/__tests__/integration/tree/potential_matches.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ const app = require('../../../app');
const utils = require('../../utils');
const tree1 = require('../../mock/tree1.json');
const capture1 = require('../../mock/capture1.json');
const grower_account1 = require('../../mock/grower_account1.json');
const grower_account2 = require('../../mock/grower_account2.json');

describe('GET /trees/potential_matches', () => {
const { knex } = utils;
before(async () => {
await knex('grower_account').insert({ ...grower_account1 });
await knex('grower_account').insert({ ...grower_account2 });
});

Expand Down Expand Up @@ -40,6 +42,7 @@ describe('GET /trees/potential_matches', () => {
await utils.addCapture({
...capture1,
estimated_geometric_location: 'POINT(50 50)',
updated_at: '2021-05-04 11:24:43',
});
const response = await request(app).get(
`/trees/potential_matches?capture_id=${capture1.id}`,
Expand All @@ -59,6 +62,7 @@ describe('GET /trees/potential_matches', () => {
...capture1,
tree_id: tree1.id,
estimated_geometric_location: 'POINT(50 50)',
updated_at: '2021-05-04 11:24:43'
});
const response = await request(app).get(
`/trees/potential_matches?capture_id=${capture1.id}`,
Expand All @@ -79,6 +83,7 @@ describe('GET /trees/potential_matches', () => {
await utils.addCapture({
...capture1,
estimated_geometric_location: 'POINT(50 50)',
updated_at: '2021-05-04 11:24:43'
});
const response = await request(app).get(
`/trees/potential_matches?capture_id=${capture1.id}`,
Expand Down

0 comments on commit f1e24f9

Please sign in to comment.