Skip to content

Commit

Permalink
fix TemporaryCredentials diff derivation
Browse files Browse the repository at this point in the history
  • Loading branch information
bartholomews committed May 2, 2021
1 parent aa0ed2c commit e4cfbd5
Showing 1 changed file with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,21 @@ trait DiffDerivations extends DiffMatcher {
implicit val consumerDiff: Diff[Consumer] = Diff.derived[Consumer]
implicit val resourceOwnerAuthorizationUriDiff: Diff[ResourceOwnerAuthorizationUri] =
Diff.derived[ResourceOwnerAuthorizationUri]
implicit val temporaryCredentialsDiff: Diff[TemporaryCredentials] = Diff.derived[TemporaryCredentials]
implicit val temporaryCredentialsDiff: Diff[TemporaryCredentials] = {
(left: TemporaryCredentials, right: TemporaryCredentials, _) =>
fromObject(
left,
DiffResultObject(
name = "TemporaryCredentials",
fields = Map(
"consumer" -> Diff[Consumer].apply(left.consumer, right.consumer),
"token" -> Diff[Token].apply(left.token, right.token),
"callbackConfirmed" -> Diff[Boolean].apply(left.callbackConfirmed, right.callbackConfirmed)
)
)
)
}

implicit val tokenDiff: Diff[Token] = Diff.derived[Token]
implicit val refreshTokenDiff: Diff[RefreshToken] = Diff.derived[RefreshToken]
implicit val scopeDiff: Diff[Scope] = Diff.derived[Scope]
Expand Down

0 comments on commit e4cfbd5

Please sign in to comment.