diff --git a/src/utils/xls.js b/src/utils/xls.js index 795abbf5..6a7b4442 100644 --- a/src/utils/xls.js +++ b/src/utils/xls.js @@ -35,7 +35,7 @@ export const sendXls = (name, bytes, response) => { export const encodeValue = (value, hex = false) => { // Todo: address this elsewhere (hide these columns). This is a quick fix for complex relationships in xlsx if (typeof value === 'object') { - value = ''; + value = value.id; } if (hex) { diff --git a/tests/integration/unit.spec.js b/tests/integration/unit.spec.js index 27e1ada2..5d995e10 100644 --- a/tests/integration/unit.spec.js +++ b/tests/integration/unit.spec.js @@ -21,7 +21,7 @@ describe('Unit Resource Integration Tests', function () { homeOrgUid = await testFixtures.getHomeOrgId(); }); - it.only('deletes a unit end-to-end (with simulator)', async function () { + it('deletes a unit end-to-end (with simulator)', async function () { /* Basic Idea for this test is that we are going to create a unit and verify that the new unit propagates through the data layer and into our db. Then we are going diff --git a/tests/test-fixtures/common-fixtures.js b/tests/test-fixtures/common-fixtures.js index 5bdb64c7..473d6d77 100644 --- a/tests/test-fixtures/common-fixtures.js +++ b/tests/test-fixtures/common-fixtures.js @@ -25,10 +25,16 @@ export const objectContainsSubSet = (obj, objSubset) => { ); }); }); + } else if (Object.keys(objSubset[key]).length) { + Object.keys(objSubset[key]).forEach((childkey) => { + expect(obj[key][childkey], childkey).to.deep.equal( + objSubset[key][childkey], + ); + }); } else { expect( objSubset[key], - `${key}: ${objSubset[key]} does not equal {${key}: ${obj[key]}}`, + `{${key}: ${objSubset[key]}} does not equal {${key}: ${obj[key]}}`, ).to.deep.equal(obj[key]); } });