From 910c239e290310e554d260cb8b8306c70a7c9bed Mon Sep 17 00:00:00 2001 From: Deluan Date: Sun, 5 Jul 2026 14:05:09 -0400 Subject: [PATCH] test(jellyfin): cover ping and quickConnectEnabled handlers Both were added alongside the System/Info/Public handshake endpoint but had no direct test coverage. --- server/jellyfin/system_test.go | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/server/jellyfin/system_test.go b/server/jellyfin/system_test.go index fd9503729..a1aa4a353 100644 --- a/server/jellyfin/system_test.go +++ b/server/jellyfin/system_test.go @@ -27,4 +27,26 @@ var _ = Describe("System", func() { Expect(info.Version).ToNot(BeEmpty()) Expect(info.ProductName).To(Equal("Jellyfin Server")) }) + + It("responds to ping with the server name", func() { + w := httptest.NewRecorder() + r := httptest.NewRequest("GET", "/System/Ping", nil) + api.ping(w, r) + + Expect(w.Code).To(Equal(http.StatusOK)) + var name string + Expect(json.Unmarshal(w.Body.Bytes(), &name)).To(Succeed()) + Expect(name).ToNot(BeEmpty()) + }) + + It("reports quick connect as disabled", func() { + w := httptest.NewRecorder() + r := httptest.NewRequest("GET", "/QuickConnect/Enabled", nil) + api.quickConnectEnabled(w, r) + + Expect(w.Code).To(Equal(http.StatusOK)) + var enabled bool + Expect(json.Unmarshal(w.Body.Bytes(), &enabled)).To(Succeed()) + Expect(enabled).To(BeFalse()) + }) })