=htc,doc #18496 lots of small improvements and last missing docs
This commit is contained in:
parent
15897a3b48
commit
bb053bea2a
57 changed files with 434 additions and 189 deletions
|
|
@ -30,24 +30,28 @@ class FullTestKitExampleSpec extends WordSpec with Matchers with ScalatestRouteT
|
|||
"The service" should {
|
||||
|
||||
"return a greeting for GET requests to the root path" in {
|
||||
// tests:
|
||||
Get() ~> smallRoute ~> check {
|
||||
responseAs[String] shouldEqual "Captain on the bridge!"
|
||||
}
|
||||
}
|
||||
|
||||
"return a 'PONG!' response for GET requests to /ping" in {
|
||||
// tests:
|
||||
Get("/ping") ~> smallRoute ~> check {
|
||||
responseAs[String] shouldEqual "PONG!"
|
||||
}
|
||||
}
|
||||
|
||||
"leave GET requests to other paths unhandled" in {
|
||||
// tests:
|
||||
Get("/kermit") ~> smallRoute ~> check {
|
||||
handled shouldBe false
|
||||
}
|
||||
}
|
||||
|
||||
"return a MethodNotAllowed error for PUT requests to the root path" in {
|
||||
// tests:
|
||||
Put() ~> Route.seal(smallRoute) ~> check {
|
||||
status === StatusCodes.MethodNotAllowed
|
||||
responseAs[String] shouldEqual "HTTP method not allowed, supported methods: GET"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue