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 {
355355 waitForExpectations ( timeout: 2 )
356356 }
357357
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+
358371 func testErrorInCustomSocketDataCallsErrorHandler( ) {
359372 let expect = expectation ( description: " The client should call the error handler for emit errors because of " +
360373 " custom data " )
You can’t perform that action at this time.
0 commit comments