Configure first WebSocket test
This commit is contained in:
15
Tests/AppTests/AppTests.swift
Normal file
15
Tests/AppTests/AppTests.swift
Normal 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!")
|
||||
})
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user