mirror of
https://github.com/kataras/iris.git
synced 2025-01-24 03:01:03 +01:00
18 lines
368 B
Go
18 lines
368 B
Go
|
package main
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
|
||
|
"github.com/kataras/iris/v12/httptest"
|
||
|
)
|
||
|
|
||
|
func TestI18nLoaderFuncMap(t *testing.T) {
|
||
|
app := newApp()
|
||
|
|
||
|
e := httptest.New(t, app)
|
||
|
e.GET("/").Expect().Status(httptest.StatusOK).
|
||
|
Body().Equal("Hi 2 dogs")
|
||
|
e.GET("/").WithHeader("Accept-Language", "el").Expect().Status(httptest.StatusOK).
|
||
|
Body().Equal("Γειά 2 σκυλί")
|
||
|
}
|