chore: delete TestSPARouteFallsBackToIndex
This commit is contained in:
parent
ed729858d6
commit
109581ceaf
1 changed files with 0 additions and 17 deletions
|
|
@ -3,26 +3,9 @@ package main
|
||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/http/httptest"
|
"net/http/httptest"
|
||||||
"strings"
|
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSPARouteFallsBackToIndex(t *testing.T) {
|
|
||||||
mux := http.NewServeMux()
|
|
||||||
registerEmbedRoutes(mux)
|
|
||||||
|
|
||||||
req := httptest.NewRequest(http.MethodGet, "/providers", nil)
|
|
||||||
rr := httptest.NewRecorder()
|
|
||||||
mux.ServeHTTP(rr, req)
|
|
||||||
|
|
||||||
if rr.Code != http.StatusOK {
|
|
||||||
t.Fatalf("status = %d, want %d", rr.Code, http.StatusOK)
|
|
||||||
}
|
|
||||||
if !strings.Contains(rr.Body.String(), `<div id="root"></div>`) {
|
|
||||||
t.Fatalf("response does not look like index.html")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestUnknownAPIPathStays404(t *testing.T) {
|
func TestUnknownAPIPathStays404(t *testing.T) {
|
||||||
mux := http.NewServeMux()
|
mux := http.NewServeMux()
|
||||||
registerEmbedRoutes(mux)
|
registerEmbedRoutes(mux)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue