Files
ccn/Services/Website/Tests/App/AppTests.swift
T

35 lines
720 B
Swift
Raw Normal View History

2026-06-27 02:26:33 +00:00
import Configuration
import Hummingbird
import HummingbirdTesting
import Logging
import Testing
@testable import Website
private let reader = ConfigReader(providers: [
InMemoryProvider(values: [
"http.host": "127.0.0.1",
"http.port": "0",
"log.level": "trace",
])
])
@Suite
struct AppTests {
@Test
func hello() async throws {
let app = try await application(
reader: reader
)
try await app.test(.router) { client in
try await client.execute(
uri: "/",
method: .get
) { response in
#expect(response.body == ByteBuffer(string: "Hello!"))
}
}
}
}