diff --git a/RPC/Tests/RPCTests/SystemHandlersTests.swift b/RPC/Tests/RPCTests/SystemHandlersTests.swift index b993bec1..59ad4fa8 100644 --- a/RPC/Tests/RPCTests/SystemHandlersTests.swift +++ b/RPC/Tests/RPCTests/SystemHandlersTests.swift @@ -29,8 +29,7 @@ final class SystemHandlersTests { let req = JSONRequest(jsonrpc: "2.0", method: "system_health", params: nil, id: 1) var buffer = ByteBuffer() try buffer.writeJSONEncodable(req) - try app.test(.POST, "/", headers: ["Content-Type": "application/json"], body: buffer) { - res in + try app.test(.POST, "/", headers: ["Content-Type": "application/json"], body: buffer) { res in #expect(res.status == .ok) let resp = try res.content.decode(JSONResponse.self, using: JSONDecoder()) #expect((resp.result!.value as! Utils.JSON).bool == true) @@ -41,8 +40,7 @@ final class SystemHandlersTests { let req = JSONRequest(jsonrpc: "2.0", method: "system_implementation", params: nil, id: 2) var buffer = ByteBuffer() try buffer.writeJSONEncodable(req) - try app.test(.POST, "/", headers: ["Content-Type": "application/json"], body: buffer) { - res in + try app.test(.POST, "/", headers: ["Content-Type": "application/json"], body: buffer) { res in #expect(res.status == .ok) let resp = try res.content.decode(JSONResponse.self, using: JSONDecoder()) #expect((resp.result!.value as! Utils.JSON).string == "Boka") @@ -53,8 +51,7 @@ final class SystemHandlersTests { let req = JSONRequest(jsonrpc: "2.0", method: "system_version", params: nil, id: 3) var buffer = ByteBuffer() try buffer.writeJSONEncodable(req) - try app.test(.POST, "/", headers: ["Content-Type": "application/json"], body: buffer) { - res in + try app.test(.POST, "/", headers: ["Content-Type": "application/json"], body: buffer) { res in #expect(res.status == .ok) let resp = try res.content.decode(JSONResponse.self, using: JSONDecoder()) #expect((resp.result!.value as! Utils.JSON).string == "0.0.1") @@ -65,8 +62,7 @@ final class SystemHandlersTests { let req = JSONRequest(jsonrpc: "2.0", method: "system_properties", params: nil, id: 4) var buffer = ByteBuffer() try buffer.writeJSONEncodable(req) - try app.test(.POST, "/", headers: ["Content-Type": "application/json"], body: buffer) { - res in + try app.test(.POST, "/", headers: ["Content-Type": "application/json"], body: buffer) { res in #expect(res.status == .ok) let resp = try res.content.decode(JSONResponse.self, using: JSONDecoder()) #expect(resp.result?.value != nil) @@ -77,8 +73,7 @@ final class SystemHandlersTests { let req = JSONRequest(jsonrpc: "2.0", method: "system_nodeRoles", params: nil, id: 5) var buffer = ByteBuffer() try buffer.writeJSONEncodable(req) - try app.test(.POST, "/", headers: ["Content-Type": "application/json"], body: buffer) { - res in + try app.test(.POST, "/", headers: ["Content-Type": "application/json"], body: buffer) { res in #expect(res.status == .ok) let resp = try res.content.decode(JSONResponse.self, using: JSONDecoder()) #expect((resp.result!.value as! Utils.JSON).array == []) @@ -89,8 +84,7 @@ final class SystemHandlersTests { let req = JSONRequest(jsonrpc: "2.0", method: "system_chain", params: nil, id: 6) var buffer = ByteBuffer() try buffer.writeJSONEncodable(req) - try app.test(.POST, "/", headers: ["Content-Type": "application/json"], body: buffer) { - res in + try app.test(.POST, "/", headers: ["Content-Type": "application/json"], body: buffer) { res in #expect(res.status == .ok) let resp = try res.content.decode(JSONResponse.self, using: JSONDecoder()) #expect((resp.result!.value as! Utils.JSON).string == "dev")