Improve i18n tests
Change-Id: I11c1222352c0cb8460dd1c6dcb4b97576c90b340
diff --git a/service_test.go b/service_test.go
index 9101080..56c5b0e 100644
--- a/service_test.go
+++ b/service_test.go
@@ -101,6 +101,16 @@
assert.Contains(t, w.Body.String(), "<title>Full Text</title>")
assert.Contains(t, w.Body.String(), "Full text provided by")
assert.Contains(t, w.Body.String(), "External provider unknown. No access to full text available.")
+
+ req, _ = http.NewRequest(http.MethodGet, "/", nil)
+ req.Header.Set("Accept-Language", "de-DE;q=0.8,en-US;q=0.5,en;q=0.3")
+
+ router.ServeHTTP(w, req)
+
+ assert.Equal(t, http.StatusOK, w.Code)
+ assert.Contains(t, w.Body.String(), "<title>Volltext</title>")
+ assert.Contains(t, w.Body.String(), "Volltext angeboten durch")
+ assert.Contains(t, w.Body.String(), "kein externer Anbieter bekannt")
}
func TestManifestRoute(t *testing.T) {