Skip to content

Commit

Permalink
add context to expiring password test
Browse files Browse the repository at this point in the history
  • Loading branch information
Squwid committed Oct 14, 2021
1 parent 266df22 commit db72263
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 db72263

Please sign in to comment.