1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-20 03:17:04 +00:00

simplify some examples

This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-11-07 12:49:14 +02:00
parent 7a19cfb211
commit 7b6a8f1e26
17 changed files with 55 additions and 172 deletions

View File

@@ -11,16 +11,11 @@ func TestI18nLoaderFuncMap(t *testing.T) {
e := httptest.New(t, app)
e.GET("/").Expect().Status(httptest.StatusOK).
Body().Equal("Hi 2 dogs")
e.GET("/singular").Expect().Status(httptest.StatusOK).
Body().Equal("Hi 1 dog")
e.GET("/members").Expect().Status(httptest.StatusOK).
Body().Equal("There are 42 members registered")
Body().Equal("Become a MEMBER")
e.GET("/title").Expect().Status(httptest.StatusOK).
Body().Equal("Account Connections")
e.GET("/").WithHeader("Accept-Language", "el").Expect().Status(httptest.StatusOK).
Body().Equal(ειά 2 σκυλί")
e.GET("/other").Expect().Status(httptest.StatusOK).
Body().Equal("AccessLogClear: Clear Access Log\nTitle: Account Connections")
e.GET("/other").WithHeader("Accept-Language", "el").Expect().Status(httptest.StatusOK).
Body().Equal("AccessLogClear: Καθαρισμός Πρόσβαση στο αρχείο καταγραφής\nTitle: Λογαριασμός Συνδέσεις")
Body().Equal(ίνε ΜΈΛΟΣ")
e.GET("/title").WithHeader("Accept-Language", "el").Expect().Status(httptest.StatusOK).
Body().Equal("Λογαριασμός Συνδέσεις")
}