aboutsummaryrefslogtreecommitdiff
path: root/core-rest/src/test/scala/xyz/driver/core/rest/DriverRouteTest.scala
diff options
context:
space:
mode:
Diffstat (limited to 'core-rest/src/test/scala/xyz/driver/core/rest/DriverRouteTest.scala')
-rw-r--r--core-rest/src/test/scala/xyz/driver/core/rest/DriverRouteTest.scala14
1 files changed, 2 insertions, 12 deletions
diff --git a/core-rest/src/test/scala/xyz/driver/core/rest/DriverRouteTest.scala b/core-rest/src/test/scala/xyz/driver/core/rest/DriverRouteTest.scala
index cc0019a..d1172fa 100644
--- a/core-rest/src/test/scala/xyz/driver/core/rest/DriverRouteTest.scala
+++ b/core-rest/src/test/scala/xyz/driver/core/rest/DriverRouteTest.scala
@@ -8,8 +8,8 @@ import akka.http.scaladsl.server.{Directives, RejectionHandler, Route}
import akka.http.scaladsl.testkit.ScalatestRouteTest
import com.typesafe.scalalogging.Logger
import org.scalatest.{AsyncFlatSpec, Matchers}
+import org.slf4j.helpers.NOPLogger
import xyz.driver.core.json.serviceExceptionFormat
-import xyz.driver.core.logging.NoLogger
import xyz.driver.core.rest.errors._
import scala.concurrent.Future
@@ -17,7 +17,7 @@ import scala.concurrent.Future
class DriverRouteTest
extends AsyncFlatSpec with ScalatestRouteTest with SprayJsonSupport with Matchers with Directives {
class TestRoute(override val route: Route) extends DriverRoute {
- override def log: Logger = NoLogger
+ override def log: Logger = Logger(NOPLogger.NOP_LOGGER)
}
"DriverRoute" should "respond with 200 OK for a basic route" in {
@@ -94,16 +94,6 @@ class DriverRouteTest
}
}
- it should "respond with a 500 for DatabaseException" in {
- val route = new TestRoute(akkaComplete(Future.failed[String](DatabaseException())))
-
- Post("/api/v1/foo/bar") ~> route.routeWithDefaults ~> check {
- handled shouldBe true
- status shouldBe StatusCodes.InternalServerError
- responseAs[ServiceException] shouldBe DatabaseException()
- }
- }
-
it should "add a `Connection: close` header to avoid clashing with envoy's timeouts" in {
val rejectionHandler = RejectionHandler.newBuilder().handleNotFound(complete(StatusCodes.NotFound)).result()
val route = new TestRoute(handleRejections(rejectionHandler)((get & path("foo"))(complete("OK"))))