Created
February 13, 2015 21:11
-
-
Save hodgestar/84dea9f224d32a0c807f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/go/apps/dialogue/tests/dummy_polls.js b/go/apps/dialogue/tests/dummy_polls.js | |
index 3b1d2b4..1ea6a10 100644 | |
--- a/go/apps/dialogue/tests/dummy_polls.js | |
+++ b/go/apps/dialogue/tests/dummy_polls.js | |
@@ -75,7 +75,7 @@ var simple_poll = { | |
url: "www.google.com", | |
method: "GET" | |
}, | |
- entry_endpoint: {uuid: "endpoint-11"}, | |
+ entry_endpoint: {uuid: "endpoint-13"}, | |
exit_endpoint: {uuid: "endpoint-12"} | |
}], | |
connections: [ | |
@@ -104,6 +104,10 @@ var simple_poll = { | |
target: {uuid: "endpoint-10"} | |
}, | |
{ | |
+ source: {uuid: "endpoint-11"}, | |
+ target: {uuid: "endpoint-13"} | |
+ }, | |
+ { | |
source: {uuid: "endpoint-12"}, | |
target: {uuid: "endpoint-10"} | |
}] | |
diff --git a/go/apps/dialogue/tests/test_vumi_app.js b/go/apps/dialogue/tests/test_vumi_app.js | |
index 1376e32..0b62f84 100644 | |
--- a/go/apps/dialogue/tests/test_vumi_app.js | |
+++ b/go/apps/dialogue/tests/test_vumi_app.js | |
@@ -320,7 +320,7 @@ describe("app", function() { | |
}); | |
}); | |
- describe("when the user enters a send state which is a http_json type", function() { | |
+ describe.only("when the user enters a send state which is a http_json type", function() { | |
it("do something", function() { | |
return tester | |
.setup(function(api) { | |
@@ -331,8 +331,9 @@ describe("app", function() { | |
.setup.user.addr('+27123') | |
.setup.user.state('choice-1') | |
.input('4') | |
+ .check.user.state('end-1') | |
.check(function(api) { | |
- console.log(api.http); | |
+ console.log(api.http.requests); | |
//console.log(api.outbound); | |
}) | |
.run(); | |
diff --git a/go/apps/dialogue/vumi_app.js b/go/apps/dialogue/vumi_app.js | |
index ea65b73..ee9766c 100644 | |
--- a/go/apps/dialogue/vumi_app.js | |
+++ b/go/apps/dialogue/vumi_app.js | |
@@ -43,14 +43,18 @@ var DialogueApp = App.extend(function(self) { | |
self.add_state = function(desc) { | |
var type = self.types[desc.type]; | |
+ console.log([desc.type, desc.uuid]); | |
if (!type) { | |
throw new Error( | |
"Unknown dialogue state type: '" + desc.type + "'"); | |
} | |
+ console.log("Good"); | |
+ | |
self.states.remove(desc.uuid); | |
return self.states.add(desc.uuid, function() { | |
+ console.log("Entering " + desc.uuid); | |
return type(desc); | |
}); | |
}; | |
@@ -186,6 +190,7 @@ var DialogueApp = App.extend(function(self) { | |
} | |
return self.states.create(self.next(desc.exit_endpoint)); | |
});*/ | |
+ console.log("Hi"); | |
return self.http.request("GET", "www.foo.bar"); | |
}; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment