Skip to content

Commit

Permalink
update related tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mbayopanda committed Oct 11, 2022
1 parent 5e9b3df commit 535bd45
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions test/integration/entities/entities.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ describe('(/entities) Entities', () => {
const responseKeys = [
'uuid', 'display_name', 'gender', 'email', 'phone',
'address', 'reference', 'entity_type_id', 'label', 'translation_key',
'title',
];

const NUM_ENTITIES = 4;
Expand Down
4 changes: 1 addition & 3 deletions test/integration/suppliers.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ describe('(/suppliers) The supplier API endpoint', () => {
const responseKeys = [
'uuid', 'creditor_uuid', 'display_name', 'address_1', 'address_2',
'email', 'fax', 'note', 'phone', 'international', 'locked',
'contact_name', 'contact_email', 'contact_phone', 'contact_title', 'contact_uuid',
];

const FILTER = {
Expand All @@ -39,7 +40,6 @@ describe('(/suppliers) The supplier API endpoint', () => {
limit : 20,
};


it('POST /suppliers should create a new supplier ', () => {
return agent.post('/suppliers')
.send(supplier)
Expand All @@ -56,7 +56,6 @@ describe('(/suppliers) The supplier API endpoint', () => {
.catch(helpers.handler);
});


it('GET /suppliers returns a list of supplier ', () => {
return agent.get('/suppliers')
.then((res) => {
Expand Down Expand Up @@ -99,7 +98,6 @@ describe('(/suppliers) The supplier API endpoint', () => {
.catch(helpers.handler);
});


it('PUT /suppliers/:uuid should update an existing supplier', () => {
return agent.put(`/suppliers/${supplier.uuid}`)
.send({ display_name : 'SUPPLIER UPDATE' })
Expand Down
8 changes: 5 additions & 3 deletions test/server-unit/purchases/purchases.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ function PurchaseUnitTests() {

// create the purchase order
await db.exec(`
INSERT INTO purchase VALUES
(HUID('${puid}'), 2, 1, 300, 0, 2, HUID('3ac4e83c-65f2-45a1-8357-8b025003d793'),
DATE_ADD(CURRENT_DATE, INTERVAL -1725 DAY), CURRENT_TIMESTAMP, NULL, 1, NULL, NULL, FALSE, 1);
INSERT INTO purchase VALUES (
HUID('${puid}'), 2, 1, 300, 0, 2, HUID('3ac4e83c-65f2-45a1-8357-8b025003d793'),
DATE_ADD(CURRENT_DATE, INTERVAL -1725 DAY), CURRENT_TIMESTAMP, NULL, 1, NULL, NULL, FALSE, 1,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
);
`);

// create a purchase item linked to the above purchase order.
Expand Down

0 comments on commit 535bd45

Please sign in to comment.