diff options
author | Vlad Uspensky <v.uspenskiy@icloud.com> | 2017-08-07 14:51:50 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-07 14:51:50 -0700 |
commit | 77973b5559d17fcb82466fcd34cfbb1841b9932b (patch) | |
tree | 31c46a8853684d3289209de6cd6562d7bffc1921 /src/test/scala/xyz/driver | |
parent | 886415aa5f86e758d9a9aafa8f60128e3473311a (diff) | |
parent | 4c40344fef816ad42c5e8da8ebd73c54f268c02b (diff) | |
download | driver-core-77973b5559d17fcb82466fcd34cfbb1841b9932b.tar.gz driver-core-77973b5559d17fcb82466fcd34cfbb1841b9932b.tar.bz2 driver-core-77973b5559d17fcb82466fcd34cfbb1841b9932b.zip |
Merge pull request #56 from drivergroup/users-hierarchyv0.16.1
Users hierarchy
Diffstat (limited to 'src/test/scala/xyz/driver')
-rw-r--r-- | src/test/scala/xyz/driver/core/AuthTest.scala | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/test/scala/xyz/driver/core/AuthTest.scala b/src/test/scala/xyz/driver/core/AuthTest.scala index 16f9e92..69dbd9e 100644 --- a/src/test/scala/xyz/driver/core/AuthTest.scala +++ b/src/test/scala/xyz/driver/core/AuthTest.scala @@ -9,6 +9,7 @@ import org.scalatest.mockito.MockitoSugar import org.scalatest.{FlatSpec, Matchers} import pdi.jwt.{Jwt, JwtAlgorithm} import xyz.driver.core.auth._ +import xyz.driver.core.domain.Email import xyz.driver.core.logging._ import xyz.driver.core.rest._ @@ -51,7 +52,14 @@ class AuthTest extends FlatSpec with Matchers with MockitoSugar with ScalatestRo 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)))) + Future.successful(Some(AuthTokenUserInfo( + Id[User]("1"), + authUserId = Id[AuthUser]("2"), + Email("foo", "bar"), + emailVerified = true, + audience = "driver", + roles = Set(TestRole) + ))) } else { Future.successful(Option.empty[User]) } |