Skip to content

Commit

Permalink
Merge pull request #90 from danzajdband/master
Browse files Browse the repository at this point in the history
query instead of send get parameters in test/server.js tests.
  • Loading branch information
rauchg committed Sep 21, 2012
2 parents 2e4cfb5 + 3344ac4 commit 00d40c3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe('server', function () {
it('should disallow non-existent transports', function (done) {
var engine = listen(function (port) {
request.get('http://localhost:%d/engine.io/default/'.s(port))
.send({ transport: 'tobi' }) // no tobi transport - outrageous
.query({ transport: 'tobi' }) // no tobi transport - outrageous
.end(function (res) {
expect(res.status).to.be(500);
done();
Expand All @@ -29,7 +29,7 @@ describe('server', function () {
// make sure we check for actual properties - not those present on every {}
var engine = listen(function (port) {
request.get('http://localhost:%d/engine.io/default/'.s(port))
.send({ transport: 'constructor' })
.query({ transport: 'constructor' })
.end(function (res) {
expect(res.status).to.be(500);
done();
Expand All @@ -40,7 +40,7 @@ describe('server', function () {
it('should disallow non-existent sids', function (done) {
var engine = listen(function (port) {
request.get('http://localhost:%d/engine.io/default/'.s(port))
.send({ transport: 'polling', sid: 'test' })
.query({ transport: 'polling', sid: 'test' })
.end(function (res) {
expect(res.status).to.be(500);
done();
Expand All @@ -53,7 +53,7 @@ describe('server', function () {
it('should send the io cookie', function (done) {
var engine = listen(function (port) {
request.get('http://localhost:%d/engine.io/default/'.s(port))
.send({ transport: 'polling' })
.query({ transport: 'polling' })
.end(function (res) {
// hack-obtain sid
var sid = res.text.match(/"sid":"([^"]+)"/)[1];
Expand All @@ -66,7 +66,7 @@ describe('server', function () {
it('should send the io cookie custom name', function (done) {
var engine = listen({ cookie: 'woot' }, function (port) {
request.get('http://localhost:%d/engine.io/default/'.s(port))
.send({ transport: 'polling' })
.query({ transport: 'polling' })
.end(function (res) {
var sid = res.text.match(/"sid":"([^"]+)"/)[1];
expect(res.headers['set-cookie'][0]).to.be('woot=' + sid);
Expand All @@ -78,7 +78,7 @@ describe('server', function () {
it('should not send the io cookie', function (done) {
var engine = listen({ cookie: false }, function (port) {
request.get('http://localhost:%d/engine.io/default/'.s(port))
.send({ transport: 'polling' })
.query({ transport: 'polling' })
.end(function (res) {
expect(res.headers['set-cookie']).to.be(undefined);
done();
Expand Down Expand Up @@ -823,4 +823,4 @@ describe('server', function () {
});
});

});
});

0 comments on commit 00d40c3

Please sign in to comment.