Skip to content

Commit

Permalink
fix(stock): integration test errors
Browse files Browse the repository at this point in the history
Make the integration tests pass by fixing a bug in the CMM calculation.
  • Loading branch information
jniles committed Oct 1, 2020
1 parent 6d188f9 commit 40212d3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/integration/stock/stock.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ describe('(/stock/) The Stock HTTP API', () => {

// (report) render all stock exit
it(
`GET /reports/stock/lots?renderer=json
returns exits for all depots`,
`GET /reports/stock/lots?renderer=json returns exits for all depots`,
async () => {
const res = await agent.get(`/reports/stock/lots?renderer=json`);
expect(res.body.rows.length).to.equal(23);
Expand Down Expand Up @@ -171,11 +170,12 @@ describe('(/stock/) The Stock HTTP API', () => {
helpers.api.listed(res, 4);

expect(res.body[1].quantity).to.equal(140);
expect(res.body[1].avg_consumption).to.equal(15);
expect(res.body[1].S_SEC).to.equal(15);
expect(res.body[1].S_MIN).to.equal(30);
expect(res.body[1].S_MAX).to.equal(30);
expect(res.body[1].S_MONTH).to.equal(9);
expect(res.body[1].avg_consumption).to.equal(8);

expect(res.body[1].S_SEC).to.equal(8);
expect(res.body[1].S_MIN).to.equal(16);
expect(res.body[1].S_MAX).to.equal(16);
expect(res.body[1].S_MONTH).to.equal(17);

expect(res.body[2].quantity).to.equal(180300);
expect(res.body[2].avg_consumption).to.equal(49916.67);
Expand Down

0 comments on commit 40212d3

Please sign in to comment.