Skip to content

Commit

Permalink
Remove redundant mock hanlers
Browse files Browse the repository at this point in the history
  • Loading branch information
etabak committed Aug 9, 2020
1 parent 3a43017 commit 909b85d
Showing 1 changed file with 12 additions and 16 deletions.
28 changes: 12 additions & 16 deletions token_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -511,14 +511,12 @@ var _ = Describe("Tokens", func() {

It("Fails with wrong user name", func() {
// Configure the server:
for i := 0; i < 100; i++ { // there are going to be several retries
oidServer.AppendHandlers(
ghttp.CombineHandlers(
VerifyPasswordGrant("baduser", "mypassword"),
RespondWithError("bad_user", "Bad user"),
),
)
}
oidServer.AppendHandlers(
ghttp.CombineHandlers(
VerifyPasswordGrant("baduser", "mypassword"),
RespondWithError("bad_user", "Bad user"),
),
)

// Create the connection:
connection, err := NewConnectionBuilder().
Expand All @@ -537,14 +535,12 @@ var _ = Describe("Tokens", func() {

It("Fails with wrong password", func() {
// Configure the server:
for i := 0; i < 100; i++ { // there are going to be several retries
oidServer.AppendHandlers(
ghttp.CombineHandlers(
VerifyPasswordGrant("myuser", "badpassword"),
RespondWithError("bad_password", "Bad password"),
),
)
}
oidServer.AppendHandlers(
ghttp.CombineHandlers(
VerifyPasswordGrant("myuser", "badpassword"),
RespondWithError("bad_password", "Bad password"),
),
)

// Create the connection:
connection, err := NewConnectionBuilder().
Expand Down

0 comments on commit 909b85d

Please sign in to comment.