我有路线
get {
pathEnd {
respondWithMediaType(`text/html`) { // XML is marshalled to `text/xml` by default, so we simply override here
complete("[]")
}
}
}
我正在尝试像这样为这条路线添加一个测试用例
Get() ~> route ~> check {
mediaType === MediaTypes.`text/html`
responseAs[String] === "[]"
}
但我越来越
[error] Request was not handled
谁能告诉我如何为这条路线编写测试用例?提前致谢。