Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: add HandleTokenFunc test #409

Merged
merged 1 commit into from Apr 15, 2016

Conversation

adrianlop
Copy link
Contributor

this PR adds test for HandleTokenFunc

Fixes #408

}
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
basicAuthEncode := base64.URLEncoding.EncodeToString([]byte(tt.creds))
req.Header.Set("Authorization", "Basic "+basicAuthEncode)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ericchiang
Copy link
Contributor

Some inline comments, but other than that lgtm.


fx, err := makeTestFixtures()
if err != nil {
t.Errorf("could not run test fixtures")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to t.Fatal here since the test can't continue if this fails. Also please print the error:

t.Fatalf("could not run test fixtures: %v", err)

@adrianlop
Copy link
Contributor Author

@ericchiang thanks for your comments! I reviewed the PR.

@ericchiang
Copy link
Contributor

lgtm. Thanks!

@ericchiang ericchiang merged commit c2c7f03 into dexidp:master Apr 15, 2016
@adrianlop adrianlop deleted the 408-test-handleToken branch April 19, 2016 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants