Permalink
Browse files

Removing fixes for other bug

  • Loading branch information...
1 parent 67b4eb9 commit 8d269aae4c892333b8ba77c25f15325edc543dc7 @martinthomson martinthomson committed Apr 26, 2012
Showing with 0 additions and 80 deletions.
  1. +0 −80 test/manager.test.js
View
@@ -220,86 +220,6 @@ module.exports = {
});
},
- 'test authorization gets handshake data': function (done) {
- var port = ++ports
- , io = sio.listen(port)
- , cl = client(port);
-
- io.configure(function () {
- function auth (data, fn) {
- data.query.should.have.foo;
- data.query.foo.should.eql('bar');
- fn(null, false);
- };
-
- io.set('authorization', auth);
- });
-
- cl.get('/socket.io/{protocol}/?foo=bar', function (res, data) {
- res.statusCode.should.eql(403);
- data.should.match(/handshake unauthorized/);
-
- cl.end();
- io.server.close();
- done();
- });
- },
-
- 'test that authorization can view handshake data': function (done) {
- var port = ++ports
- , io = sio.listen(port)
- , cl = client(port);
-
- io.configure(function () {
- function auth (data, fn) {
- data.query.should.have.foo;
- data.query.foo.should.eql('bar');
- fn(null, true);
- };
-
- io.set('authorization', auth);
- });
-
- cl.get('/socket.io/{protocol}/?foo=bar', function (res, data) {
- res.statusCode.should.eql(200);
-
- cl.end();
- io.server.close();
- done();
- });
- },
-
- 'test that authorization can change handshake data': function (done) {
- var port = ++ports
- , io = sio.listen(port)
- , cl = client(port);
-
- io.configure(function () {
- function auth (data, fn) {
- var replacement = { baz: 'qu' };
- for (i in data) {
- if (data.hasOwnProperty(i)) {
- replacement[i] = data[i];
- }
- }
- fn(null, true, replacement);
- };
-
- io.set('authorization', auth);
- });
-
- cl.get('/socket.io/{protocol}/', function (res, data) {
- var id = data.split(':', 2)[0];
- res.statusCode.should.eql(200);
- io.handshaken[id].should.have.baz;
- io.handshaken[id].baz.should.eql('qu');
-
- cl.end();
- io.server.close();
- done();
- });
- },
-
'test a handshake error': function (done) {
var port = ++ports
, io = sio.listen(port)

0 comments on commit 8d269aa

Please sign in to comment.