New statistics

This commit is contained in:
2017-10-16 01:07:08 +02:00
parent 68901ac25e
commit 7336fa2035
3 changed files with 19 additions and 19 deletions

View File

@ -1,12 +1,12 @@
package main
import (
"fmt"
"net/http"
"net/http/httptest"
"testing"
"github.com/aerogo/aero"
"github.com/fatih/color"
)
func TestRoutes(t *testing.T) {
@ -24,7 +24,7 @@ func TestRoutes(t *testing.T) {
app.Handler().ServeHTTP(responseRecorder, request)
if status := responseRecorder.Code; status != http.StatusOK {
color.Red("%s | Wrong status code | %v instead of %v", example, status, http.StatusOK)
panic(fmt.Errorf("%s | Wrong status code | %v instead of %v", example, status, http.StatusOK))
}
}
}