File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -355,6 +355,19 @@ class SocketSideEffectTest: XCTestCase {
355
355
waitForExpectations ( timeout: 2 )
356
356
}
357
357
358
+ func testConnectedAlready( ) {
359
+ let expect = expectation ( description: " The client should call its handler if it's connected already " )
360
+
361
+ socket. setTestStatus ( . connected)
362
+ manager. engine = TestEngine ( client: manager, url: manager. socketURL, options: nil )
363
+
364
+ socket. connect ( timeoutAfter: 0.5 , withHandler: {
365
+ expect. fulfill ( )
366
+ } )
367
+
368
+ waitForExpectations ( timeout: 0.8 )
369
+ }
370
+
358
371
func testErrorInCustomSocketDataCallsErrorHandler( ) {
359
372
let expect = expectation ( description: " The client should call the error handler for emit errors because of " +
360
373
" custom data " )
You can’t perform that action at this time.
0 commit comments