Skip to content

Commit

Permalink
chore: remove duplicated tests
Browse files Browse the repository at this point in the history
Signed-off-by: Pat Losoponkul <pat.losoponkul@iohk.io>
  • Loading branch information
Pat Losoponkul committed Oct 20, 2023
1 parent 2d5bad6 commit 7f02810
Showing 1 changed file with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,18 +188,10 @@ object KeycloakAuthenticatorSpec
authenticator <- ZIO.service[KeycloakAuthenticator]
wallet <- ZIO.serviceWithZIO[WalletManagementService](_.createWallet(Wallet("wallet-1")))
exit1 <- authenticator.authenticate("").exit
exit2 <- authenticator.authenticate("what sorcery is this?").exit
exit2 <- authenticator.authenticate("123").exit
} yield assert(exit1)(fails(isSubtype[AuthenticationError.InvalidCredentials](anything)))
&& assert(exit2)(fails(isSubtype[AuthenticationError.InvalidCredentials](anything)))
},
test("reject malformed token") {
for {
client <- ZIO.service[KeycloakClient]
authenticator <- ZIO.service[KeycloakAuthenticator]
wallet <- ZIO.serviceWithZIO[WalletManagementService](_.createWallet(Wallet("wallet-1")))
exit <- authenticator.authenticate("what sorcery is this?").exit
} yield assert(exit)(fails(isSubtype[AuthenticationError.InvalidCredentials](anything)))
},
test("reject expired token") {
for {
client <- ZIO.service[KeycloakClient]
Expand Down

0 comments on commit 7f02810

Please sign in to comment.