Permalink
Browse files

Added tests for query string

  • Loading branch information...
1 parent 0450cc4 commit edfec30b77d7f049a1d258ae02d29ecadb844884 Yihui Saw committed Mar 11, 2013
Showing with 13 additions and 0 deletions.
  1. +13 −0 test/server.js
View
@@ -211,6 +211,19 @@ describe('server', function () {
});
});
});
+
+ it('should allow data through query string in uri', function (done) {
+ var engine = listen({ allowUpgrades: false }, function (port) {
+ var socket = new eioc.Socket('ws://localhost:%d?a=b&c=d'.s(port));
+ engine.on('connection', function (conn) {
+ expect(conn.request.query).to.have.keys('transport', 'a');
+ expect(conn.request.query.a).to.be('b');
+ expect(conn.request.query).to.have.keys('transport', 'c');
+ expect(conn.request.query.c).to.be('d');
+ done();
+ });
+ });
+ });
});
describe('close', function () {

0 comments on commit edfec30

Please sign in to comment.