Alexis Hernandez
7 years ago
3 changed files with 34 additions and 0 deletions
@ -0,0 +1,14 @@ |
|||
package controllers |
|||
|
|||
import javax.inject.Inject |
|||
|
|||
import controllers.common.{MyJsonController, MyJsonControllerComponents} |
|||
|
|||
class HealthController @Inject() ( |
|||
cc: MyJsonControllerComponents) |
|||
extends MyJsonController(cc) { |
|||
|
|||
def check() = Action { |
|||
Ok |
|||
} |
|||
} |
@ -0,0 +1,18 @@ |
|||
package controllers |
|||
|
|||
import controllers.common.MyAPISpec |
|||
import play.api.Application |
|||
import play.api.test.Helpers._ |
|||
|
|||
class HealthControllerSpec extends MyAPISpec { |
|||
|
|||
val application: Application = guiceApplicationBuilder.build() |
|||
|
|||
"GET /health" should { |
|||
"return OK" in { |
|||
val response = GET("/health") |
|||
|
|||
status(response) mustEqual OK |
|||
} |
|||
} |
|||
} |
Loading…
Reference in new issue