aboutsummaryrefslogtreecommitdiff
path: root/src/test/scala/com/drivergrp/core/AuthTest.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/scala/com/drivergrp/core/AuthTest.scala')
-rw-r--r--src/test/scala/com/drivergrp/core/AuthTest.scala8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/test/scala/com/drivergrp/core/AuthTest.scala b/src/test/scala/com/drivergrp/core/AuthTest.scala
index 0e4841b..992ae83 100644
--- a/src/test/scala/com/drivergrp/core/AuthTest.scala
+++ b/src/test/scala/com/drivergrp/core/AuthTest.scala
@@ -4,7 +4,8 @@ import com.drivergrp.core.auth._
import akka.http.scaladsl.testkit.ScalatestRouteTest
import akka.http.scaladsl.server._
import Directives._
-import akka.http.scaladsl.model.headers.RawHeader
+import akka.http.scaladsl.model.headers.{HttpChallenges, RawHeader}
+import akka.http.scaladsl.server.AuthenticationFailedRejection.CredentialsRejected
import org.scalatest.mock.MockitoSugar
import org.scalatest.{FlatSpec, Matchers}
@@ -34,7 +35,10 @@ class AuthTest extends FlatSpec with Matchers with MockitoSugar with ScalatestRo
} ~>
check {
handled shouldBe false
- rejections should contain(ValidationRejection("User does not have the required permission CanAssignRoles", None))
+ rejections should contain(
+ AuthenticationFailedRejection(
+ CredentialsRejected,
+ HttpChallenges.basic("User does not have the required permission CanAssignRoles")))
}
}