mirror of
https://github.com/kataras/iris.git
synced 2026-01-09 13:05:56 +00:00
minor for travis
Former-commit-id: 2a62e2817e8fc98a77359344a88505151b61654e
This commit is contained in:
@@ -55,6 +55,7 @@ func (r resource) loadFromBase(dir string) string {
|
||||
|
||||
if runtime.GOOS != "windows" {
|
||||
result = strings.Replace(result, "\n", "\r\n", -1)
|
||||
result = strings.Replace(result, "\r\r", "", -1)
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
@@ -48,6 +48,7 @@ func (r resource) loadFromBase(dir string) string {
|
||||
result := string(b)
|
||||
if runtime.GOOS != "windows" {
|
||||
result = strings.Replace(result, "\n", "\r\n", -1)
|
||||
result = strings.Replace(result, "\r\r", "", -1)
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import (
|
||||
"io/ioutil"
|
||||
"testing"
|
||||
|
||||
"github.com/kataras/iris/v12"
|
||||
"github.com/kataras/iris/v12/httptest"
|
||||
)
|
||||
|
||||
@@ -20,7 +21,9 @@ func TestContentNegotiation(t *testing.T) {
|
||||
expectedHTMLResponse = "<h1>Test Name</h1><h2>Age 26</h2>"
|
||||
)
|
||||
|
||||
e := httptest.New(t, newApp())
|
||||
app := newApp()
|
||||
app.Configure(iris.WithOptimizations)
|
||||
e := httptest.New(t, app)
|
||||
|
||||
e.GET("/resource").WithHeader("Accept", "application/json").
|
||||
Expect().Status(httptest.StatusOK).
|
||||
|
||||
Reference in New Issue
Block a user