Add option to allow share to be downloaded

This commit is contained in:
Deluan
2023-03-10 23:01:03 -05:00
committed by Deluan Quintão
parent a22eef39f7
commit a7d3e6e1f1
13 changed files with 70 additions and 7 deletions
+11
View File
@@ -245,6 +245,17 @@ var _ = Describe("serveIndex", func() {
Expect(config).To(HaveKeyWithValue("enableSharing", false))
})
It("sets the defaultDownloadableShare", func() {
conf.Server.DefaultDownloadableShare = true
r := httptest.NewRequest("GET", "/index.html", nil)
w := httptest.NewRecorder()
serveIndex(ds, fs, nil)(w, r)
config := extractAppConfig(w.Body.String())
Expect(config).To(HaveKeyWithValue("defaultDownloadableShare", true))
})
It("sets the defaultDownsamplingFormat", func() {
r := httptest.NewRequest("GET", "/index.html", nil)
w := httptest.NewRecorder()