Skip to content

Commit

Permalink
fix: Fix typos in filter_test.go
Browse files Browse the repository at this point in the history
  • Loading branch information
hirakiuc authored and ghostsquad committed Aug 27, 2019
1 parent 38a755b commit e9a261c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions filter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ import (
func TestFilterService_GetList(t *testing.T) {
setup()
defer teardown()
testAPIEdpoint := "/rest/api/2/filter"
testAPIEndpoint := "/rest/api/2/filter"
raw, err := ioutil.ReadFile("./mocks/all_filters.json")
if err != nil {
t.Error(err.Error())
}
testMux.HandleFunc(testAPIEdpoint, func(writer http.ResponseWriter, request *http.Request) {
testMux.HandleFunc(testAPIEndpoint, func(writer http.ResponseWriter, request *http.Request) {
testMethod(t, request, "GET")
testRequestURL(t, request, testAPIEdpoint)
testRequestURL(t, request, testAPIEndpoint)
fmt.Fprint(writer, string(raw))
})

Expand All @@ -33,14 +33,14 @@ func TestFilterService_GetList(t *testing.T) {
func TestFilterService_Get(t *testing.T) {
setup()
defer teardown()
testAPIEdpoint := "/rest/api/2/filter/10000"
testAPIEndpoint := "/rest/api/2/filter/10000"
raw, err := ioutil.ReadFile("./mocks/filter.json")
if err != nil {
t.Error(err.Error())
}
testMux.HandleFunc(testAPIEdpoint, func(writer http.ResponseWriter, request *http.Request) {
testMux.HandleFunc(testAPIEndpoint, func(writer http.ResponseWriter, request *http.Request) {
testMethod(t, request, "GET")
testRequestURL(t, request, testAPIEdpoint)
testRequestURL(t, request, testAPIEndpoint)
fmt.Fprintf(writer, string(raw))
})

Expand All @@ -57,14 +57,14 @@ func TestFilterService_Get(t *testing.T) {
func TestFilterService_GetFavouriteList(t *testing.T) {
setup()
defer teardown()
testAPIEdpoint := "/rest/api/2/filter/favourite"
testAPIEndpoint := "/rest/api/2/filter/favourite"
raw, err := ioutil.ReadFile("./mocks/favourite_filters.json")
if err != nil {
t.Error(err.Error())
}
testMux.HandleFunc(testAPIEdpoint, func(writer http.ResponseWriter, request *http.Request) {
testMux.HandleFunc(testAPIEndpoint, func(writer http.ResponseWriter, request *http.Request) {
testMethod(t, request, "GET")
testRequestURL(t, request, testAPIEdpoint)
testRequestURL(t, request, testAPIEndpoint)
fmt.Fprint(writer, string(raw))
})

Expand Down

0 comments on commit e9a261c

Please sign in to comment.