2020-09-10 04:17:03 +02:00
|
|
|
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).
|
2020-11-07 11:49:14 +01:00
|
|
|
Body().Equal("Become a MEMBER")
|
|
|
|
e.GET("/title").Expect().Status(httptest.StatusOK).
|
|
|
|
Body().Equal("Account Connections")
|
2020-09-10 04:17:03 +02:00
|
|
|
e.GET("/").WithHeader("Accept-Language", "el").Expect().Status(httptest.StatusOK).
|
2020-11-07 11:49:14 +01:00
|
|
|
Body().Equal("Γίνε ΜΈΛΟΣ")
|
|
|
|
e.GET("/title").WithHeader("Accept-Language", "el").Expect().Status(httptest.StatusOK).
|
|
|
|
Body().Equal("Λογαριασμός Συνδέσεις")
|
2020-09-10 04:17:03 +02:00
|
|
|
}
|