2022-09-23 00:28:47 +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).
|
2023-07-08 01:08:18 +02:00
|
|
|
Body().IsEqual("Become a MEMBER")
|
2022-09-23 00:28:47 +02:00
|
|
|
e.GET("/title").Expect().Status(httptest.StatusOK).
|
2023-07-08 01:08:18 +02:00
|
|
|
Body().IsEqual("Account Connections")
|
2022-09-23 00:28:47 +02:00
|
|
|
e.GET("/").WithHeader("Accept-Language", "el").Expect().Status(httptest.StatusOK).
|
2023-07-08 01:08:18 +02:00
|
|
|
Body().IsEqual("Γίνε ΜΈΛΟΣ")
|
2022-09-23 00:28:47 +02:00
|
|
|
e.GET("/title").WithHeader("Accept-Language", "el").Expect().Status(httptest.StatusOK).
|
2023-07-08 01:08:18 +02:00
|
|
|
Body().IsEqual("Λογαριασμός Συνδέσεις")
|
2022-09-23 00:28:47 +02:00
|
|
|
}
|