mirror of
https://github.com/wassname/talk.git
synced 2026-07-17 11:33:39 +08:00
Updating mocks.
This commit is contained in:
@@ -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
@@ -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 */
|
||||
|
||||
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user