我有路线
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
有谁能告诉我如何为这条路线编写测试用例?提前谢谢。