Skip to content

Commit

Permalink
test: Update tests for the HandleRoutes function
Browse files Browse the repository at this point in the history
  • Loading branch information
Dobefu committed Jan 25, 2025
1 parent af217df commit 4a266b4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions cmd/server/handle-routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ func HandleRoutes(mux *http.ServeMux, apiPath string) {
apiRoute(mux, apiPath, "/sitemap-data", "GET", v1.GetSitemapData)
apiRoute(mux, apiPath, "/sync", "POST", v1.Sync)

mux.HandleFunc("GET /dashboard-entries-tree", func(w http.ResponseWriter, r *http.Request) {
routes.DashboardEntriesTree(w, r)
})
mux.HandleFunc("GET /dashboard-entries-tree", routes.DashboardEntriesTree)
}

func apiRoute(
Expand Down
2 changes: 1 addition & 1 deletion cmd/server/handle-routes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/stretchr/testify/assert"
)

func TestHandleRoutes(t *testing.T) {
func TestHandleRoutesSuccess(t *testing.T) {
mux := http.NewServeMux()
apiPath := "/api"
HandleRoutes(mux, apiPath)
Expand Down

0 comments on commit 4a266b4

Please sign in to comment.