Updating mocks.

This commit is contained in:
David Jay
2017-02-13 16:29:56 -05:00
parent c756b22302
commit 1af25bb2a7
3 changed files with 7 additions and 4 deletions
+3
View File
@@ -3,6 +3,9 @@
# install selenium
selenium-standalone install --config=./selenium.config.js
# Clear db
mongo test --eval "db.dropDatabase()"
# Init application
./bin/cli setup --defaults
+1 -1
View File
@@ -12,7 +12,7 @@ module.exports.comments = (comments) => Assets.findOrCreateByUrl(globals.baseUrl
comment.asset_id = asset.id;
return comment;
});
return Comments.create(comments);
return Comments.publicCreate(comments);
});
/* Create an array of users */
+3 -3
View File
@@ -125,15 +125,15 @@ module.exports = {
// Add a mock user
.then(() => mocks.users([{
displayName: 'Baby Blue',
displayName: 'BabyBlue',
email: 'whale@tale.sea',
password: 'krill'
password: 'krillaretasty'
}]))
// Add a mock preapproved comment by that user
.then((user) => mocks.comments([{
body: 'Whales are not fish.',
status: 'accepted',
status: 'ACCEPTED',
author_id: user.id
}]))
.then(() => {