File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,21 @@ describe("Pusher", function() {
92
92
} ) . to . throwException ( / ^ I n v a l i d s o c k e t i d : ' ' $ / ) ;
93
93
} ) ;
94
94
95
+ it ( "should raise an exception if socket id is invalid" , function ( ) {
96
+ expect ( function ( ) {
97
+ pusher . authenticate ( "1.1:" , "test" )
98
+ } ) . to . throwException ( / ^ I n v a l i d s o c k e t i d / ) ;
99
+ expect ( function ( ) {
100
+ pusher . authenticate ( ":1.1" , "test" )
101
+ } ) . to . throwException ( / ^ I n v a l i d s o c k e t i d / ) ;
102
+ expect ( function ( ) {
103
+ pusher . authenticate ( ":\n1.1" , "test" )
104
+ } ) . to . throwException ( / ^ I n v a l i d s o c k e t i d / ) ;
105
+ expect ( function ( ) {
106
+ pusher . authenticate ( "1.1\n:" , "test" )
107
+ } ) . to . throwException ( / ^ I n v a l i d s o c k e t i d / ) ;
108
+ } ) ;
109
+
95
110
it ( "should raise an exception if channel name is not a string" , function ( ) {
96
111
expect ( function ( ) {
97
112
pusher . authenticate ( "111.222" , undefined )
You can’t perform that action at this time.
0 commit comments