Commit 10a9ba26 authored by Tristan Cavelier's avatar Tristan Cavelier

one jio tests added

parent 65371df7
...@@ -393,7 +393,7 @@ ...@@ -393,7 +393,7 @@
*/ */
test('Valid Responses & Callbacks', function () { test('Valid Responses & Callbacks', function () {
var clock, jio, o = {}; var clock, jio, o = {};
expect(8); expect(9);
clock = sinon.useFakeTimers(); clock = sinon.useFakeTimers();
jio = new JIO({ jio = new JIO({
...@@ -407,7 +407,10 @@ ...@@ -407,7 +407,10 @@
// valid response. // valid response.
o.message = "Post Command: post(metadata).always(function (answer) {..}) " + o.message = "Post Command: post(metadata).always(function (answer) {..}) " +
"+ valid response."; "+ valid response.";
jio.post({}).always(function (answer) { jio.post({}).done(function () {
o.called = 'done';
}).always(function (answer) {
ok(o.called === 'done', "Done callback called first");
deepEqual(answer, { deepEqual(answer, {
"id": "document id a", "id": "document id a",
"method": "post", "method": "post",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment