Socket Connection Tests Always Success
eridbardhaj opened this issue · 1 comments
eridbardhaj commented
- (void)testConnectToLocalhost {
XCTestExpectation *connectionExpectation = [self expectationWithDescription: @"should connect to localhost"];
[SIOSocket socketWithHost: @"ws://sdfsdf" response: ^(SIOSocket *socket) {
XCTAssertNotNil(socket, @"socket could not connect to localhost");
[connectionExpectation fulfill];
}];
[self waitForExpectationsWithTimeout: 10 handler: nil];
}
For any host this Socket will say that the connection is opened. Is there any reason why? Because I want to know if I can reach a specific WebSocket server, and this was the way that I was introduced to in Tests
danipralea commented
This happens to me as well