Skip to content

Commit 2b87146

Browse files
committed
Fixed typo: apiEdpoint vs. apiEndpoint
1 parent a014314 commit 2b87146

18 files changed

+100
-100
lines changed

cloud/board_test.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ import (
1111
func TestBoardService_GetAllBoards(t *testing.T) {
1212
setup()
1313
defer teardown()
14-
testAPIEdpoint := "/rest/agile/1.0/board"
14+
testapiEndpoint := "/rest/agile/1.0/board"
1515

1616
raw, err := os.ReadFile("../testing/mock-data/all_boards.json")
1717
if err != nil {
1818
t.Error(err.Error())
1919
}
20-
testMux.HandleFunc(testAPIEdpoint, func(w http.ResponseWriter, r *http.Request) {
20+
testMux.HandleFunc(testapiEndpoint, func(w http.ResponseWriter, r *http.Request) {
2121
testMethod(t, r, http.MethodGet)
22-
testRequestURL(t, r, testAPIEdpoint)
22+
testRequestURL(t, r, testapiEndpoint)
2323
fmt.Fprint(w, string(raw))
2424
})
2525

@@ -36,15 +36,15 @@ func TestBoardService_GetAllBoards(t *testing.T) {
3636
func TestBoardService_GetAllBoards_WithFilter(t *testing.T) {
3737
setup()
3838
defer teardown()
39-
testAPIEdpoint := "/rest/agile/1.0/board"
39+
testapiEndpoint := "/rest/agile/1.0/board"
4040

4141
raw, err := os.ReadFile("../testing/mock-data/all_boards_filtered.json")
4242
if err != nil {
4343
t.Error(err.Error())
4444
}
45-
testMux.HandleFunc(testAPIEdpoint, func(w http.ResponseWriter, r *http.Request) {
45+
testMux.HandleFunc(testapiEndpoint, func(w http.ResponseWriter, r *http.Request) {
4646
testMethod(t, r, http.MethodGet)
47-
testRequestURL(t, r, testAPIEdpoint)
47+
testRequestURL(t, r, testapiEndpoint)
4848
testRequestParams(t, r, map[string]string{"type": "scrum", "name": "Test", "startAt": "1", "maxResults": "10", "projectKeyOrId": "TE"})
4949
fmt.Fprint(w, string(raw))
5050
})
@@ -69,11 +69,11 @@ func TestBoardService_GetAllBoards_WithFilter(t *testing.T) {
6969
func TestBoardService_GetBoard(t *testing.T) {
7070
setup()
7171
defer teardown()
72-
testAPIEdpoint := "/rest/agile/1.0/board/1"
72+
testapiEndpoint := "/rest/agile/1.0/board/1"
7373

74-
testMux.HandleFunc(testAPIEdpoint, func(w http.ResponseWriter, r *http.Request) {
74+
testMux.HandleFunc(testapiEndpoint, func(w http.ResponseWriter, r *http.Request) {
7575
testMethod(t, r, http.MethodGet)
76-
testRequestURL(t, r, testAPIEdpoint)
76+
testRequestURL(t, r, testapiEndpoint)
7777
fmt.Fprint(w, `{"id":4,"self":"https://test.jira.org/rest/agile/1.0/board/1","name":"Test Weekly","type":"scrum"}`)
7878
})
7979

cloud/field_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ import (
1111
func TestFieldService_GetList(t *testing.T) {
1212
setup()
1313
defer teardown()
14-
testAPIEdpoint := "/rest/api/2/field"
14+
testapiEndpoint := "/rest/api/2/field"
1515

1616
raw, err := os.ReadFile("../testing/mock-data/all_fields.json")
1717
if err != nil {
1818
t.Error(err.Error())
1919
}
20-
testMux.HandleFunc(testAPIEdpoint, func(w http.ResponseWriter, r *http.Request) {
20+
testMux.HandleFunc(testapiEndpoint, func(w http.ResponseWriter, r *http.Request) {
2121
testMethod(t, r, http.MethodGet)
22-
testRequestURL(t, r, testAPIEdpoint)
22+
testRequestURL(t, r, testapiEndpoint)
2323
fmt.Fprint(w, string(raw))
2424
})
2525

cloud/permissionscheme_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,14 @@ func TestPermissionSchemeService_GetList_NoList(t *testing.T) {
6363
func TestPermissionSchemeService_Get(t *testing.T) {
6464
setup()
6565
defer teardown()
66-
testAPIEdpoint := "/rest/api/3/permissionscheme/10100"
66+
testapiEndpoint := "/rest/api/3/permissionscheme/10100"
6767
raw, err := os.ReadFile("../testing/mock-data/permissionscheme.json")
6868
if err != nil {
6969
t.Error(err.Error())
7070
}
71-
testMux.HandleFunc(testAPIEdpoint, func(writer http.ResponseWriter, request *http.Request) {
71+
testMux.HandleFunc(testapiEndpoint, func(writer http.ResponseWriter, request *http.Request) {
7272
testMethod(t, request, http.MethodGet)
73-
testRequestURL(t, request, testAPIEdpoint)
73+
testRequestURL(t, request, testapiEndpoint)
7474
fmt.Fprint(writer, string(raw))
7575
})
7676

@@ -86,14 +86,14 @@ func TestPermissionSchemeService_Get(t *testing.T) {
8686
func TestPermissionSchemeService_Get_NoScheme(t *testing.T) {
8787
setup()
8888
defer teardown()
89-
testAPIEdpoint := "/rest/api/3/permissionscheme/99999"
89+
testapiEndpoint := "/rest/api/3/permissionscheme/99999"
9090
raw, err := os.ReadFile("../testing/mock-data/no_permissionscheme.json")
9191
if err != nil {
9292
t.Error(err.Error())
9393
}
94-
testMux.HandleFunc(testAPIEdpoint, func(writer http.ResponseWriter, request *http.Request) {
94+
testMux.HandleFunc(testapiEndpoint, func(writer http.ResponseWriter, request *http.Request) {
9595
testMethod(t, request, http.MethodGet)
96-
testRequestURL(t, request, testAPIEdpoint)
96+
testRequestURL(t, request, testapiEndpoint)
9797
fmt.Fprint(writer, string(raw))
9898
})
9999

cloud/priority_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ import (
1111
func TestPriorityService_GetList(t *testing.T) {
1212
setup()
1313
defer teardown()
14-
testAPIEdpoint := "/rest/api/2/priority"
14+
testapiEndpoint := "/rest/api/2/priority"
1515

1616
raw, err := os.ReadFile("../testing/mock-data/all_priorities.json")
1717
if err != nil {
1818
t.Error(err.Error())
1919
}
20-
testMux.HandleFunc(testAPIEdpoint, func(w http.ResponseWriter, r *http.Request) {
20+
testMux.HandleFunc(testapiEndpoint, func(w http.ResponseWriter, r *http.Request) {
2121
testMethod(t, r, http.MethodGet)
22-
testRequestURL(t, r, testAPIEdpoint)
22+
testRequestURL(t, r, testapiEndpoint)
2323
fmt.Fprint(w, string(raw))
2424
})
2525

cloud/project_test.go

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ import (
1111
func TestProjectService_GetAll(t *testing.T) {
1212
setup()
1313
defer teardown()
14-
testAPIEdpoint := "/rest/api/2/project"
14+
testapiEndpoint := "/rest/api/2/project"
1515

1616
raw, err := os.ReadFile("../testing/mock-data/all_projects.json")
1717
if err != nil {
1818
t.Error(err.Error())
1919
}
20-
testMux.HandleFunc(testAPIEdpoint, func(w http.ResponseWriter, r *http.Request) {
20+
testMux.HandleFunc(testapiEndpoint, func(w http.ResponseWriter, r *http.Request) {
2121
testMethod(t, r, http.MethodGet)
2222
testRequestURL(t, r, "/rest/api/2/project?expand=issueTypes")
2323
fmt.Fprint(w, string(raw))
@@ -35,15 +35,15 @@ func TestProjectService_GetAll(t *testing.T) {
3535
func TestProjectService_Get(t *testing.T) {
3636
setup()
3737
defer teardown()
38-
testAPIEdpoint := "/rest/api/2/project/12310505"
38+
testapiEndpoint := "/rest/api/2/project/12310505"
3939

4040
raw, err := os.ReadFile("../testing/mock-data/project.json")
4141
if err != nil {
4242
t.Error(err.Error())
4343
}
44-
testMux.HandleFunc(testAPIEdpoint, func(w http.ResponseWriter, r *http.Request) {
44+
testMux.HandleFunc(testapiEndpoint, func(w http.ResponseWriter, r *http.Request) {
4545
testMethod(t, r, http.MethodGet)
46-
testRequestURL(t, r, testAPIEdpoint)
46+
testRequestURL(t, r, testapiEndpoint)
4747
fmt.Fprint(w, string(raw))
4848
})
4949

@@ -63,11 +63,11 @@ func TestProjectService_Get(t *testing.T) {
6363
func TestProjectService_Get_NoProject(t *testing.T) {
6464
setup()
6565
defer teardown()
66-
testAPIEdpoint := "/rest/api/2/project/99999999"
66+
testapiEndpoint := "/rest/api/2/project/99999999"
6767

68-
testMux.HandleFunc(testAPIEdpoint, func(w http.ResponseWriter, r *http.Request) {
68+
testMux.HandleFunc(testapiEndpoint, func(w http.ResponseWriter, r *http.Request) {
6969
testMethod(t, r, http.MethodGet)
70-
testRequestURL(t, r, testAPIEdpoint)
70+
testRequestURL(t, r, testapiEndpoint)
7171
fmt.Fprint(w, nil)
7272
})
7373

@@ -87,11 +87,11 @@ func TestProjectService_Get_NoProject(t *testing.T) {
8787
func TestProjectService_GetPermissionScheme_Failure(t *testing.T) {
8888
setup()
8989
defer teardown()
90-
testAPIEdpoint := "/rest/api/2/project/99999999/permissionscheme"
90+
testapiEndpoint := "/rest/api/2/project/99999999/permissionscheme"
9191

92-
testMux.HandleFunc(testAPIEdpoint, func(w http.ResponseWriter, r *http.Request) {
92+
testMux.HandleFunc(testapiEndpoint, func(w http.ResponseWriter, r *http.Request) {
9393
testMethod(t, r, http.MethodGet)
94-
testRequestURL(t, r, testAPIEdpoint)
94+
testRequestURL(t, r, testapiEndpoint)
9595
fmt.Fprint(w, nil)
9696
})
9797

@@ -111,11 +111,11 @@ func TestProjectService_GetPermissionScheme_Failure(t *testing.T) {
111111
func TestProjectService_GetPermissionScheme_Success(t *testing.T) {
112112
setup()
113113
defer teardown()
114-
testAPIEdpoint := "/rest/api/2/project/99999999/permissionscheme"
114+
testapiEndpoint := "/rest/api/2/project/99999999/permissionscheme"
115115

116-
testMux.HandleFunc(testAPIEdpoint, func(w http.ResponseWriter, r *http.Request) {
116+
testMux.HandleFunc(testapiEndpoint, func(w http.ResponseWriter, r *http.Request) {
117117
testMethod(t, r, http.MethodGet)
118-
testRequestURL(t, r, testAPIEdpoint)
118+
testRequestURL(t, r, testapiEndpoint)
119119
fmt.Fprint(w, `{
120120
"expand": "permissions,user,group,projectRole,field,all",
121121
"id": 10201,

cloud/resolution_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ import (
1111
func TestResolutionService_GetList(t *testing.T) {
1212
setup()
1313
defer teardown()
14-
testAPIEdpoint := "/rest/api/2/resolution"
14+
testapiEndpoint := "/rest/api/2/resolution"
1515

1616
raw, err := os.ReadFile("../testing/mock-data/all_resolutions.json")
1717
if err != nil {
1818
t.Error(err.Error())
1919
}
20-
testMux.HandleFunc(testAPIEdpoint, func(w http.ResponseWriter, r *http.Request) {
20+
testMux.HandleFunc(testapiEndpoint, func(w http.ResponseWriter, r *http.Request) {
2121
testMethod(t, r, http.MethodGet)
22-
testRequestURL(t, r, testAPIEdpoint)
22+
testRequestURL(t, r, testapiEndpoint)
2323
fmt.Fprint(w, string(raw))
2424
})
2525

cloud/role_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,14 @@ func TestRoleService_GetList(t *testing.T) {
6464
func TestRoleService_Get_NoRole(t *testing.T) {
6565
setup()
6666
defer teardown()
67-
testAPIEdpoint := "/rest/api/3/role/99999"
67+
testapiEndpoint := "/rest/api/3/role/99999"
6868
raw, err := os.ReadFile("../testing/mock-data/no_role.json")
6969
if err != nil {
7070
t.Error(err.Error())
7171
}
72-
testMux.HandleFunc(testAPIEdpoint, func(writer http.ResponseWriter, request *http.Request) {
72+
testMux.HandleFunc(testapiEndpoint, func(writer http.ResponseWriter, request *http.Request) {
7373
testMethod(t, request, http.MethodGet)
74-
testRequestURL(t, request, testAPIEdpoint)
74+
testRequestURL(t, request, testapiEndpoint)
7575
fmt.Fprint(writer, string(raw))
7676
})
7777

@@ -87,14 +87,14 @@ func TestRoleService_Get_NoRole(t *testing.T) {
8787
func TestRoleService_Get(t *testing.T) {
8888
setup()
8989
defer teardown()
90-
testAPIEdpoint := "/rest/api/3/role/10002"
90+
testapiEndpoint := "/rest/api/3/role/10002"
9191
raw, err := os.ReadFile("../testing/mock-data/role.json")
9292
if err != nil {
9393
t.Error(err.Error())
9494
}
95-
testMux.HandleFunc(testAPIEdpoint, func(writer http.ResponseWriter, request *http.Request) {
95+
testMux.HandleFunc(testapiEndpoint, func(writer http.ResponseWriter, request *http.Request) {
9696
testMethod(t, request, http.MethodGet)
97-
testRequestURL(t, request, testAPIEdpoint)
97+
testRequestURL(t, request, testapiEndpoint)
9898
fmt.Fprint(writer, string(raw))
9999
})
100100

cloud/sprint_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ func TestSprintService_MoveIssuesToSprint(t *testing.T) {
4343
func TestSprintService_GetIssuesForSprint(t *testing.T) {
4444
setup()
4545
defer teardown()
46-
testAPIEdpoint := "/rest/agile/1.0/sprint/123/issue"
46+
testapiEndpoint := "/rest/agile/1.0/sprint/123/issue"
4747

4848
raw, err := os.ReadFile("../testing/mock-data/issues_in_sprint.json")
4949
if err != nil {
5050
t.Error(err.Error())
5151
}
52-
testMux.HandleFunc(testAPIEdpoint, func(w http.ResponseWriter, r *http.Request) {
52+
testMux.HandleFunc(testapiEndpoint, func(w http.ResponseWriter, r *http.Request) {
5353
testMethod(t, r, http.MethodGet)
54-
testRequestURL(t, r, testAPIEdpoint)
54+
testRequestURL(t, r, testapiEndpoint)
5555
fmt.Fprint(w, string(raw))
5656
})
5757

cloud/status_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@ import (
1111
func TestStatusService_GetAllStatuses(t *testing.T) {
1212
setup()
1313
defer teardown()
14-
testAPIEdpoint := "/rest/api/2/status"
14+
testapiEndpoint := "/rest/api/2/status"
1515

1616
raw, err := os.ReadFile("../testing/mock-data/all_statuses.json")
1717
if err != nil {
1818
t.Error(err.Error())
1919
}
2020

21-
testMux.HandleFunc(testAPIEdpoint, func(w http.ResponseWriter, r *http.Request) {
21+
testMux.HandleFunc(testapiEndpoint, func(w http.ResponseWriter, r *http.Request) {
2222
testMethod(t, r, http.MethodGet)
23-
testRequestURL(t, r, testAPIEdpoint)
23+
testRequestURL(t, r, testapiEndpoint)
2424
fmt.Fprint(w, string(raw))
2525
})
2626

onpremise/board_test.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ import (
1111
func TestBoardService_GetAllBoards(t *testing.T) {
1212
setup()
1313
defer teardown()
14-
testAPIEdpoint := "/rest/agile/1.0/board"
14+
testapiEndpoint := "/rest/agile/1.0/board"
1515

1616
raw, err := os.ReadFile("../testing/mock-data/all_boards.json")
1717
if err != nil {
1818
t.Error(err.Error())
1919
}
20-
testMux.HandleFunc(testAPIEdpoint, func(w http.ResponseWriter, r *http.Request) {
20+
testMux.HandleFunc(testapiEndpoint, func(w http.ResponseWriter, r *http.Request) {
2121
testMethod(t, r, http.MethodGet)
22-
testRequestURL(t, r, testAPIEdpoint)
22+
testRequestURL(t, r, testapiEndpoint)
2323
fmt.Fprint(w, string(raw))
2424
})
2525

@@ -36,15 +36,15 @@ func TestBoardService_GetAllBoards(t *testing.T) {
3636
func TestBoardService_GetAllBoards_WithFilter(t *testing.T) {
3737
setup()
3838
defer teardown()
39-
testAPIEdpoint := "/rest/agile/1.0/board"
39+
testapiEndpoint := "/rest/agile/1.0/board"
4040

4141
raw, err := os.ReadFile("../testing/mock-data/all_boards_filtered.json")
4242
if err != nil {
4343
t.Error(err.Error())
4444
}
45-
testMux.HandleFunc(testAPIEdpoint, func(w http.ResponseWriter, r *http.Request) {
45+
testMux.HandleFunc(testapiEndpoint, func(w http.ResponseWriter, r *http.Request) {
4646
testMethod(t, r, http.MethodGet)
47-
testRequestURL(t, r, testAPIEdpoint)
47+
testRequestURL(t, r, testapiEndpoint)
4848
testRequestParams(t, r, map[string]string{"type": "scrum", "name": "Test", "startAt": "1", "maxResults": "10", "projectKeyOrId": "TE"})
4949
fmt.Fprint(w, string(raw))
5050
})
@@ -69,11 +69,11 @@ func TestBoardService_GetAllBoards_WithFilter(t *testing.T) {
6969
func TestBoardService_GetBoard(t *testing.T) {
7070
setup()
7171
defer teardown()
72-
testAPIEdpoint := "/rest/agile/1.0/board/1"
72+
testapiEndpoint := "/rest/agile/1.0/board/1"
7373

74-
testMux.HandleFunc(testAPIEdpoint, func(w http.ResponseWriter, r *http.Request) {
74+
testMux.HandleFunc(testapiEndpoint, func(w http.ResponseWriter, r *http.Request) {
7575
testMethod(t, r, http.MethodGet)
76-
testRequestURL(t, r, testAPIEdpoint)
76+
testRequestURL(t, r, testapiEndpoint)
7777
fmt.Fprint(w, `{"id":4,"self":"https://test.jira.org/rest/agile/1.0/board/1","name":"Test Weekly","type":"scrum"}`)
7878
})
7979

0 commit comments

Comments
 (0)