1
0
mirror of https://github.com/interviewstreet/go-jira.git synced 2025-06-14 23:45:03 +02:00

Adds test for authentication on expected json. Adds test to metaissue

This commit is contained in:
Bidesh Thapaliya
2016-09-27 13:26:07 +02:00
parent d3ec8f16c0
commit e75e7750f2
3 changed files with 94 additions and 3 deletions

View File

@ -133,6 +133,9 @@ func (s *AuthenticationService) GetCurrentUser() (*Session, error) {
if err != nil {
return nil, fmt.Errorf("Error sending request to get user info : %s", err)
}
if resp.StatusCode != 200 {
return nil, fmt.Errorf("Getting user info failed with status : %d", resp.StatusCode)
}
defer resp.Body.Close()
ret := new(Session)