From de3be129a09b9f4c230605bfb7347e1480941045 Mon Sep 17 00:00:00 2001
From: donal <donalspring@gmail.com>
Date: Thu, 12 Apr 2018 17:08:20 +0200
Subject: [PATCH] SOLUTION for exercise 3

---
 server/api/todo/todo.spec.js |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/server/api/todo/todo.spec.js b/server/api/todo/todo.spec.js
index 14f28d8..c66fe46 100755
--- a/server/api/todo/todo.spec.js
+++ b/server/api/todo/todo.spec.js
@@ -193,10 +193,10 @@
 
 
   // Exercise 3 test case!
-  it("should ....", function(done) {
+  it("should mark todo as important and persist it", function(done) {
     request(app)
       .put("/api/todos/" + todoId)
-      .send({ title: "LOVE endpoint/server side testing!", completed: true })
+      .send({ title: "LOVE endpoint/server side testing!", completed: true, important: true })
       .expect(200)
       .expect("Content-Type", /json/)
       .end(function(err, res) {
@@ -204,7 +204,7 @@
         res.body.should.have.property("_id");
         res.body.title.should.equal("LOVE endpoint/server side testing!");
         // YOUR TEST GO HERE
-        
+        res.body.important.should.equal(true);
         done();
       });
   });

--
Gitblit v1.9.3