Skip to content

Commit 8d269aa

Browse files
committed
Removing fixes for other bug
1 parent 67b4eb9 commit 8d269aa

File tree

1 file changed

+0
-80
lines changed

1 file changed

+0
-80
lines changed

test/manager.test.js

Lines changed: 0 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -220,86 +220,6 @@ module.exports = {
220220
});
221221
},
222222

223-
'test authorization gets handshake data': function (done) {
224-
var port = ++ports
225-
, io = sio.listen(port)
226-
, cl = client(port);
227-
228-
io.configure(function () {
229-
function auth (data, fn) {
230-
data.query.should.have.foo;
231-
data.query.foo.should.eql('bar');
232-
fn(null, false);
233-
};
234-
235-
io.set('authorization', auth);
236-
});
237-
238-
cl.get('/socket.io/{protocol}/?foo=bar', function (res, data) {
239-
res.statusCode.should.eql(403);
240-
data.should.match(/handshake unauthorized/);
241-
242-
cl.end();
243-
io.server.close();
244-
done();
245-
});
246-
},
247-
248-
'test that authorization can view handshake data': function (done) {
249-
var port = ++ports
250-
, io = sio.listen(port)
251-
, cl = client(port);
252-
253-
io.configure(function () {
254-
function auth (data, fn) {
255-
data.query.should.have.foo;
256-
data.query.foo.should.eql('bar');
257-
fn(null, true);
258-
};
259-
260-
io.set('authorization', auth);
261-
});
262-
263-
cl.get('/socket.io/{protocol}/?foo=bar', function (res, data) {
264-
res.statusCode.should.eql(200);
265-
266-
cl.end();
267-
io.server.close();
268-
done();
269-
});
270-
},
271-
272-
'test that authorization can change handshake data': function (done) {
273-
var port = ++ports
274-
, io = sio.listen(port)
275-
, cl = client(port);
276-
277-
io.configure(function () {
278-
function auth (data, fn) {
279-
var replacement = { baz: 'qu' };
280-
for (i in data) {
281-
if (data.hasOwnProperty(i)) {
282-
replacement[i] = data[i];
283-
}
284-
}
285-
fn(null, true, replacement);
286-
};
287-
288-
io.set('authorization', auth);
289-
});
290-
291-
cl.get('/socket.io/{protocol}/', function (res, data) {
292-
var id = data.split(':', 2)[0];
293-
res.statusCode.should.eql(200);
294-
io.handshaken[id].should.have.baz;
295-
io.handshaken[id].baz.should.eql('qu');
296-
297-
cl.end();
298-
io.server.close();
299-
done();
300-
});
301-
},
302-
303223
'test a handshake error': function (done) {
304224
var port = ++ports
305225
, io = sio.listen(port)

0 commit comments

Comments
 (0)