aboutsummaryrefslogtreecommitdiff
path: root/core-rest/src/test/scala/xyz/driver/core/rest/DriverRouteTest.scala
diff options
context:
space:
mode:
authorJakob Odersky <jakob@driver.xyz>2018-10-04 13:52:14 -0700
committerJakob Odersky <jakob@odersky.com>2018-10-09 16:19:39 -0700
commit477804e21c3c61666a48b74f17caef04233c2363 (patch)
tree0f12c52e34850cac4ddeab99ae8b5d761f2dd3a3 /core-rest/src/test/scala/xyz/driver/core/rest/DriverRouteTest.scala
parente67f49c20c6901bf77bcfb735254e44dc70c0cee (diff)
downloaddriver-core-477804e21c3c61666a48b74f17caef04233c2363.tar.gz
driver-core-477804e21c3c61666a48b74f17caef04233c2363.tar.bz2
driver-core-477804e21c3c61666a48b74f17caef04233c2363.zip
Fix dependencies in tests to accomodate project split
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"))))