Sesame-Server/Tests/AppTests/AppTests.swift

16 lines
393 B
Swift
Raw Normal View History

2022-01-23 20:49:06 +01:00
@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!")
})
}
}