spand
09/09/2016, 1:06 PM@Test
fun `fallback interceptor works in child selector`(){
val root = routing()
val child = root.select(UriPartConstantRouteSelector("/foo"))
val wasCalled = AtomicBoolean(false)
child.intercept(ApplicationCallPipeline.Fallback) {
wasCalled.set(true)
}
on("resolve /foo/bar"){
val resolveResult = context(root, "/foo/bar").resolve()
it("should successfully resolve") {
assertTrue(wasCalled.get())
}
}
}