Skip to content

Commit

Permalink
Merge 39a46b9 into 9f62670
Browse files Browse the repository at this point in the history
  • Loading branch information
greenkeeperio-bot committed Jul 11, 2017
2 parents 9f62670 + 39a46b9 commit 311db22
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -44,7 +44,7 @@
],
"license": "Apache-2.0",
"dependencies": {
"acl": "^0.4.9",
"acl": "^0.4.10",
"bcrypt-nodejs": "0.0.3",
"body-parser": "^1.17.2",
"breakpoint-sass": "^2.7.1",
Expand Down
8 changes: 7 additions & 1 deletion tests/apis.js
Expand Up @@ -308,12 +308,18 @@ test.serial('Utils: Format Results - with follow', t => {
});

test.serial('Utils: Format Results - depth with follow', t => {
const testable = utils.testables(live, allTypes);
let testable = utils.testables(live, allTypes);
const query = {
follow: 'true',
depth: 2, // depth gets subtracted during attributes, to see depth the format function needs at least depth: two
};

// fixes a bug where sometimes testable.model.attributes is null
if (!testable.model || !testable.model.attributes) {
const refixtures = utils.generate(generated, lang);
testable = utils.testables(refixtures.live, refixtures.types.full);
}

const formatted = apiUtils.format([testable.expected], testable.model.attributes, allTypes, query);

return formatted.then(result => {
Expand Down

0 comments on commit 311db22

Please sign in to comment.