Permalink
Browse files

socket.io 1.0 test

I know this test fails with current (0.9.x) socket.io; this is in preparation for the upcoming 1.0 release of socket.io, which apparently will support a `path` option.
  • Loading branch information...
1 parent 47adcca commit 10578b67ecef75a3a521834daa9a5292864f5dd2 @shimaore shimaore committed Apr 3, 2013
Showing with 11 additions and 0 deletions.
  1. +11 −0 tests/assets.coffee
View
@@ -277,3 +277,14 @@ port = 15200
t.equal 4, res.headers['content-type'], 'application/javascript'
c.get '/myapp/zappa/sammy.js', (err, res) ->
t.equal 5, res.headers['content-type'], 'application/javascript'
+
+ 'socket.io_prefix': (t) ->
+ t.expect 'content-type', 'length'
+ t.wait 3000
+
+ zapp = zappa port++, io:{path:'/myapp/socket.io'}, ->
+
+ c = t.client(zapp.server)
+ c.get '/myapp/socket.io/socket.io.js', (err, res) ->
+ t.equal 'content-type', res.headers['content-type'], 'application/javascript'
+ t.equal 'length', res.headers['content-length'], '74659'

0 comments on commit 10578b6

Please sign in to comment.