diff options
Diffstat (limited to 'src/test/scala/xyz/driver')
-rw-r--r-- | src/test/scala/xyz/driver/core/AuthTest.scala | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/test/scala/xyz/driver/core/AuthTest.scala b/src/test/scala/xyz/driver/core/AuthTest.scala index e6025fb..76c2933 100644 --- a/src/test/scala/xyz/driver/core/AuthTest.scala +++ b/src/test/scala/xyz/driver/core/AuthTest.scala @@ -31,13 +31,14 @@ class AuthTest extends FlatSpec with Matchers with MockitoSugar with ScalatestRo } val authStatusService = new AuthProvider[User](authorization, NoLogger) { - override def authenticatedUser(implicit ctx: ServiceRequestContext): OptionT[Future, User] = OptionT.optionT[Future] { - if (ctx.contextHeaders.keySet.contains(AuthProvider.AuthenticationTokenHeader)) { - Future.successful(Some(BasicUser(Id[User]("1"), Set(TestRole)))) - } else { - Future.successful(Option.empty[User]) + override def authenticatedUser(implicit ctx: ServiceRequestContext): OptionT[Future, User] = + OptionT.optionT[Future] { + if (ctx.contextHeaders.keySet.contains(AuthProvider.AuthenticationTokenHeader)) { + Future.successful(Some(BasicUser(Id[User]("1"), Set(TestRole)))) + } else { + Future.successful(Option.empty[User]) + } } - } } import authStatusService._ |