mirror of
https://github.com/interviewstreet/go-jira.git
synced 2025-06-23 00:07:40 +02:00
Fixed unit tests
This commit is contained in:
@ -9,9 +9,9 @@ import (
|
|||||||
func TestUserService_Get_Success(t *testing.T) {
|
func TestUserService_Get_Success(t *testing.T) {
|
||||||
setup()
|
setup()
|
||||||
defer teardown()
|
defer teardown()
|
||||||
testMux.HandleFunc("/rest/api/2/user/fred", func(w http.ResponseWriter, r *http.Request) {
|
testMux.HandleFunc("/rest/api/2/user", func(w http.ResponseWriter, r *http.Request) {
|
||||||
testMethod(t, r, "GET")
|
testMethod(t, r, "GET")
|
||||||
testRequestURL(t, r, "/rest/api/2/user/fred")
|
testRequestURL(t, r, "/rest/api/2/user?username=fred")
|
||||||
|
|
||||||
fmt.Fprint(w, `{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","key":"fred",
|
fmt.Fprint(w, `{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","key":"fred",
|
||||||
"name":"fred","emailAddress":"fred@example.com","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred",
|
"name":"fred","emailAddress":"fred@example.com","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred",
|
||||||
|
Reference in New Issue
Block a user