Renamed the DocCMiddleware.Configuration type in the library target as DocCConfiguration.
This commit is contained in:
@@ -20,6 +20,7 @@ import struct Hummingbird.LocalFileSystem
|
||||
import struct Hummingbird.Request
|
||||
import struct Logging.Logger
|
||||
|
||||
@testable import struct HummingbirdDocC.DocCConfiguration
|
||||
@testable import struct HummingbirdDocC.DocCMiddleware
|
||||
|
||||
@Suite("DocC Middleware", .tags(.middleware))
|
||||
@@ -290,7 +291,7 @@ private extension DocCMiddlewareTests {
|
||||
/// - configuration: A type that contains the parameters to configure the middleware.
|
||||
/// - logger: A type that interacts with the logging system.
|
||||
func assertInit(
|
||||
configuration: DocCMiddleware<LocalFileSystem>.Configuration,
|
||||
configuration: DocCConfiguration,
|
||||
logger: Logger = .test()
|
||||
) {
|
||||
// GIVEN
|
||||
@@ -318,7 +319,7 @@ private extension DocCMiddlewareTests {
|
||||
/// - logger: A type that interacts with the logging system.
|
||||
/// - fileProvider: A type that conforms to the protocol that defines file system interactions, if any.
|
||||
func assertInit<FileSystemProvider: FileProvider>(
|
||||
configuration: DocCMiddleware<FileSystemProvider>.Configuration,
|
||||
configuration: DocCConfiguration,
|
||||
logger: Logger = .test(),
|
||||
fileProvider: FileSystemProvider
|
||||
) {
|
||||
@@ -448,7 +449,7 @@ private extension DocCMiddlewareTests {
|
||||
default: .init(fileIdentifier: .init(), shouldLoadFile: false)
|
||||
}
|
||||
|
||||
let context: any RequestContext = RequestContextMock(logger: logger)
|
||||
let context: RequestContextMock = .init(logger: logger)
|
||||
let request: Request = .test(
|
||||
method: .get,
|
||||
path: uriPath
|
||||
@@ -475,7 +476,7 @@ private extension DocCMiddlewareTests {
|
||||
.contentLength: (statusCode == .ok ? "36" : "0")
|
||||
])
|
||||
|
||||
let contentLength = try #require(result.body.contentLength)
|
||||
let contentLength = #require(result.body.contentLength)
|
||||
|
||||
if statusCode == .ok {
|
||||
#expect(contentLength > 0)
|
||||
|
||||
Reference in New Issue
Block a user