From 0028d6306cc82f34ebed4ce72caca980fc8ce3e2 Mon Sep 17 00:00:00 2001
From: donal <donalspring@gmail.com>
Date: Thu, 12 Apr 2018 16:38:26 +0200
Subject: [PATCH] ADD test scaffold for tdd exercise

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

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

--
Gitblit v1.9.3