Permalink
Browse files

passing test for re-basing the url

  • Loading branch information...
1 parent dd64082 commit aaccbb1683a28b338bb82c84e5dd0107144c130f @substack committed Jul 15, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 test/compose.js
View
@@ -23,6 +23,7 @@ var server0 = http.createServer(function (req, res) {
});
var server1 = http.createServer(function (req, res) {
+ res.setHeader('original-url', req.url);
res.end('boop\n');
});
@@ -35,14 +36,15 @@ p1.service('web.localhost', { mount : '/beep' }, function (port, ready) {
});
test('compose', function (t) {
- t.plan(3);
+ t.plan(4);
setTimeout(function () {
request('http://localhost:' + port.web, function (e, r, b) {
t.equal(b, 'hello cruel world\n');
});
request('http://localhost:' + port.web + '/beep', function (e, r, b) {
+ t.equal(r.headers['original-url'], '/');
t.equal(b, 'boop\n');
});

0 comments on commit aaccbb1

Please sign in to comment.