Add new config option to show a custom welcome message in the login screen

This commit is contained in:
Deluan
2020-07-03 11:51:15 -04:00
parent 3a7d70c908
commit dd91f983b5
7 changed files with 70 additions and 10 deletions
+22
View File
@@ -81,6 +81,28 @@ var _ = Describe("ServeIndex", func() {
Expect(config).To(HaveKeyWithValue("loginBackgroundURL", "my_background_url"))
})
It("sets the welcomeMessage", func() {
conf.Server.UIWelcomeMessage = "Hello"
r := httptest.NewRequest("GET", "/index.html", nil)
w := httptest.NewRecorder()
ServeIndex(ds, fs)(w, r)
config := extractAppConfig(w.Body.String())
Expect(config).To(HaveKeyWithValue("welcomeMessage", "Hello"))
})
It("sets the enableTranscodingConfig", func() {
conf.Server.EnableTranscodingConfig = true
r := httptest.NewRequest("GET", "/index.html", nil)
w := httptest.NewRecorder()
ServeIndex(ds, fs)(w, r)
config := extractAppConfig(w.Body.String())
Expect(config).To(HaveKeyWithValue("enableTranscodingConfig", true))
})
It("sets the version", func() {
r := httptest.NewRequest("GET", "/index.html", nil)
w := httptest.NewRecorder()