Permalink
Browse files

added test answer

  • Loading branch information...
1 parent 833ac74 commit 405d3c340c56af4e0a0b985807760876c23d2c38 @scottcowan scottcowan committed Oct 23, 2011
Showing with 12 additions and 4 deletions.
  1. +12 −4 dbcreation.js
View
@@ -42,11 +42,9 @@ function createViews() {
function createUsers() {
encryption.hash("password", function(hash){
+ db.save({_id: "testuser1", name: "Tim Caswell", age: 28, email: "tim.caswell@gmail.com", password: hash, type: "user", isElevated: false}, function ( err, doc) {});
- db.save({_id: "testuser1", name: "Tim Caswell", age: 28, email: "tim.caswell@gmail.com", password: hash, type: "user", isElevated: false}, function ( err, doc) {
- // You know know if there was an error and have an updated version
- // of the document (with `_id` and `_rev`).
- });
+ db.save({_id: "testuser2", name: "Nick", age: 28, email: "test@nick.com", password: hash, type: "user", isElevated: false}, function ( err, doc) {});
})
};
@@ -65,6 +63,16 @@ function createQuestions(){
"description": "the GP says she is depressed and needs to take medication. I dont want her on take anti-depressants."
}
});
+ db.save({
+ "_id": "testanswer1",
+ "type": "answer",
+ "questionId": "testquestion1",
+ "userId": "testuser2",
+ "displayname": "Nick",
+ "answer": "sport has got a massive capacity to improve the lives of people suffering from mental health problems because physical activity is good for mental health, whether you have a mental health problem or not. Sport provides a forum for social interaction",
+ "rank": 0,
+ "date": "2011-10-23T09:59:10.118Z"
+});
}
function createTags() {

0 comments on commit 405d3c3

Please sign in to comment.