Skip to content

Commit f0a8282

Browse files
author
Gayathri Sairamkrishnan
committed
Fix unit test formatting issues
1 parent c68e5d4 commit f0a8282

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

Tests/OpenAPIRuntimeTests/Errors/Test_RuntimeError.swift

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ struct MockRuntimeErrorHandler: Sendable {
2929
}
3030

3131
final class Test_RuntimeError: XCTestCase {
32-
3332
func testRuntimeError_withUnderlyingErrorNotConfirming_returns500() async throws {
34-
35-
let server = UniversalServer(handler: MockRuntimeErrorHandler(failWithError: RuntimeError.transportFailed(TestError())),
36-
middlewares: [ErrorHandlingMiddleware()])
33+
let server = UniversalServer(
34+
handler: MockRuntimeErrorHandler(failWithError: RuntimeError.transportFailed(TestError())),
35+
middlewares: [ErrorHandlingMiddleware()]
36+
)
3737
let response = try await server.handle(
3838
request: .init(soar_path: "/", method: .post),
3939
requestBody: MockHandler.requestBody,
@@ -50,9 +50,10 @@ final class Test_RuntimeError: XCTestCase {
5050
}
5151

5252
func testRuntimeError_withUnderlyingErrorConfirming_returnsCorrectStatusCode() async throws {
53-
54-
let server = UniversalServer(handler: MockRuntimeErrorHandler(failWithError: TestErrorConvertible.testError("Test Error")),
55-
middlewares: [ErrorHandlingMiddleware()])
53+
let server = UniversalServer(
54+
handler: MockRuntimeErrorHandler(failWithError: TestErrorConvertible.testError("Test Error")),
55+
middlewares: [ErrorHandlingMiddleware()]
56+
)
5657
let response = try await server.handle(
5758
request: .init(soar_path: "/", method: .post),
5859
requestBody: MockHandler.requestBody,
@@ -71,11 +72,6 @@ final class Test_RuntimeError: XCTestCase {
7172

7273
enum TestErrorConvertible: Error, HTTPResponseConvertible {
7374
case testError(String)
74-
7575
/// HTTP status code for error cases
76-
public var httpStatus: HTTPTypes.HTTPResponse.Status {
77-
.badGateway
78-
}
76+
public var httpStatus: HTTPTypes.HTTPResponse.Status { .badGateway }
7977
}
80-
81-

0 commit comments

Comments
 (0)