first commit

This commit is contained in:
Christoph Hagen
2021-10-02 21:45:32 +02:00
commit ce95ce5856
10 changed files with 183 additions and 0 deletions

View File

@ -0,0 +1,15 @@
@testable import App
import XCTVapor
final class AppTests: XCTestCase {
func testHelloWorld() throws {
let app = Application(.testing)
defer { app.shutdown() }
try configure(app)
try app.test(.GET, "hello", afterResponse: { res in
XCTAssertEqual(res.status, .ok)
XCTAssertEqual(res.body.string, "Hello, world!")
})
}
}