Skip to content

Commit

Permalink
fix(purchase): fix broken integration test
Browse files Browse the repository at this point in the history
This commit fixes a broken integration test in the purchase controller.
  • Loading branch information
jniles committed Feb 25, 2016
1 parent 17873d1 commit bd789d3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions server/controllers/finance/purchase.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ function list (req, res, next) {
.done();
}

function detail (req, res, next) {
function detail(req, res, next) {
'use strict';

var uuid = req.params.uuid;
Expand Down Expand Up @@ -186,7 +186,7 @@ function update(req, res, next) {
.then(function () {

// fetch the changed object from the database
return lookupPurchaseOrder(uuid);
return lookupPurchaseOrder(uuid, req.codes);
})
.then(function (record) {

Expand All @@ -209,4 +209,4 @@ exports.list = list;
exports.detail = detail;

//Update properties of a purchase Order
exports.update = update;
exports.update = update;
4 changes: 2 additions & 2 deletions server/test/api/purchase.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,11 @@ describe('The /Purchase Order API endpoint', function () {
});
});

it('PUT /purchase Unable to update an invalid purchase order ', function () {
it('PUT /purchase unable to update an invalid purchase order ', function () {
return agent.put('/purchase/invalid')
.send({ is_integration : 1 })
.then(function (res) {
expect(res).to.have.status(500);
expect(res).to.have.status(404);
})
.catch(helpers.handler);
});
Expand Down

0 comments on commit bd789d3

Please sign in to comment.