refactor test

This commit is contained in:
Erik 2016-01-29 13:08:41 -05:00
parent fe3599d1fe
commit b8307b6b27

View File

@ -79,10 +79,8 @@ class SocketEngineTest: XCTestCase {
let expectation = expectationWithDescription("Engine Decodes utf8")
client.on("stringTest") {data, ack in
if let str = data[0] as? String {
assert(str == "lïne one\nlīne \rtwo", "Failed string test")
expectation.fulfill()
}
XCTAssertEqual(data[0] as? String, "lïne one\nlīne \rtwo", "Failed string test")
expectation.fulfill()
}
engine.parsePollingMessage("41:42[\"stringTest\",\"lïne one\\nlīne \\rtwo\"]")