Skip to content

Commit

Permalink
Merge pull request #345 from GESkunkworks/fix/expire-password-testcase
Browse files Browse the repository at this point in the history
add context to expiring password test
  • Loading branch information
Squwid authored Oct 14, 2021
2 parents 266df22 + db72263 commit fd96b45
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/provider/pingfed/pingfed_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,13 @@ func TestHandlePasswordExpiring(t *testing.T) {
require.Nil(t, err)

ac := Client{}
_, req, err := ac.handlePasswordExpiring(context.Background(), doc)
loginDetails := creds.LoginDetails{
Username: "fdsa",
Password: "secret",
URL: "https://example.com/foo",
}
ctx := context.WithValue(context.Background(), ctxKey("login"), &loginDetails)
_, req, err := ac.handlePasswordExpiring(ctx, doc)
require.Nil(t, err)

b, err := ioutil.ReadAll(req.Body)
Expand Down

0 comments on commit fd96b45

Please sign in to comment.