diff options
author | Satya Boora <sboora@users.noreply.github.com> | 2018-04-10 12:33:02 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-10 12:33:02 -0700 |
commit | 4cfa6a09c6f6692f5513ff6e31f261a020d07068 (patch) | |
tree | 07b1067771f0be135a2c4511e701be22244df1df /src/test | |
parent | f7c3184c0932db90eaae266e1518f94076ce5912 (diff) | |
download | driver-core-4cfa6a09c6f6692f5513ff6e31f261a020d07068.tar.gz driver-core-4cfa6a09c6f6692f5513ff6e31f261a020d07068.tar.bz2 driver-core-4cfa6a09c6f6692f5513ff6e31f261a020d07068.zip |
Use AuthenticationFailedRejection to send 401 back to the client (#151)v1.8.20
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/scala/xyz/driver/core/AuthTest.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/scala/xyz/driver/core/AuthTest.scala b/src/test/scala/xyz/driver/core/AuthTest.scala index 6e5862a..a7707aa 100644 --- a/src/test/scala/xyz/driver/core/AuthTest.scala +++ b/src/test/scala/xyz/driver/core/AuthTest.scala @@ -79,7 +79,8 @@ class AuthTest extends FlatSpec with Matchers with ScalatestRouteTest { } ~> check { // handled shouldBe false - rejections should contain(ValidationRejection("Wasn't able to find authenticated user for the token provided")) + val challenge = HttpChallenges.basic("Failed to authenticate user") + rejections should contain(AuthenticationFailedRejection(CredentialsRejected, challenge)) } } |