Skip to content

Commit

Permalink
update swiftlint
Browse files Browse the repository at this point in the history
  • Loading branch information
MacOMNI committed Jan 22, 2025
1 parent fcde29c commit afa46c1
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions RPC/Tests/RPCTests/SystemHandlersTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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")
Expand All @@ -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")
Expand All @@ -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)
Expand All @@ -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 == [])
Expand All @@ -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")
Expand Down

0 comments on commit afa46c1

Please sign in to comment.