!htp #16101 improve basic directive infrastructure, add more scaladoc, fix smaller problems
This commit is contained in:
parent
33ddabbc9f
commit
0033e74cae
12 changed files with 204 additions and 182 deletions
|
|
@ -77,7 +77,7 @@ class BasicRouteSpecs extends RoutingSpec {
|
|||
}
|
||||
}
|
||||
"Route disjunction" should {
|
||||
"work" in {
|
||||
"work in the happy case" in {
|
||||
val route = sealRoute((path("abc") | path("def")) {
|
||||
completeOk
|
||||
})
|
||||
|
|
@ -92,6 +92,15 @@ class BasicRouteSpecs extends RoutingSpec {
|
|||
status shouldEqual StatusCodes.NotFound
|
||||
}
|
||||
}
|
||||
"don't apply alternative if inner route rejects" in {
|
||||
object MyRejection extends Rejection
|
||||
val route = (path("abc") | post) {
|
||||
reject(MyRejection)
|
||||
}
|
||||
Get("/abc") ~> route ~> check {
|
||||
rejection shouldEqual MyRejection
|
||||
}
|
||||
}
|
||||
}
|
||||
"Case class extraction with Directive.as" should {
|
||||
"extract one argument" in {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue