Fixed tests
This commit is contained in:
parent
4d919ef752
commit
36427a1501
@ -4,6 +4,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/http/httptest"
|
"net/http/httptest"
|
||||||
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/aerogo/aero"
|
"github.com/aerogo/aero"
|
||||||
@ -111,7 +112,7 @@ func TestQuotePages(t *testing.T) {
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
func testRoute(t *testing.T, app *aero.Application, route string) {
|
func testRoute(t *testing.T, app *aero.Application, route string) {
|
||||||
request := httptest.NewRequest("GET", route, nil)
|
request := httptest.NewRequest("GET", strings.ReplaceAll(route, " ", "%20"), nil)
|
||||||
response := httptest.NewRecorder()
|
response := httptest.NewRecorder()
|
||||||
app.ServeHTTP(response, request)
|
app.ServeHTTP(response, request)
|
||||||
status := response.Code
|
status := response.Code
|
||||||
|
Loading…
Reference in New Issue
Block a user