refactor: rename spy to streamerSpy in e2e tests for clarity

Renamed the spy variable to streamerSpy across all e2e test files so
that its purpose is immediately clear without needing to look up the
declaration.
This commit is contained in:
Deluan
2026-03-10 17:19:25 -04:00
parent 053a0fd6c0
commit 75e5bc4e81
4 changed files with 48 additions and 48 deletions
+5 -5
View File
@@ -544,8 +544,8 @@ var _ = Describe("Transcode Endpoints", Ordered, func() {
// Stream using the token
w := doRawReq("getTranscodeStream", "mediaId", flacTrackID, "mediaType", "song", "transcodeParams", token)
Expect(w.Code).To(Equal(http.StatusOK))
Expect(spy.LastRequest.Format).To(Equal("mp3"))
Expect(spy.LastRequest.BitRate).To(Equal(128))
Expect(streamerSpy.LastRequest.Format).To(Equal("mp3"))
Expect(streamerSpy.LastRequest.BitRate).To(Equal(128))
})
})
})
@@ -617,7 +617,7 @@ var _ = Describe("Transcode Endpoints", Ordered, func() {
w := doRawReq("getTranscodeStream", "mediaId", mp3TrackID, "mediaType", "song", "transcodeParams", token)
Expect(w.Code).To(Equal(http.StatusOK))
// Direct play: format should be "raw" or empty
Expect(spy.LastRequest.Format).To(BeElementOf("raw", ""))
Expect(streamerSpy.LastRequest.Format).To(BeElementOf("raw", ""))
})
It("streams transcoded FLAC to MP3", func() {
@@ -631,7 +631,7 @@ var _ = Describe("Transcode Endpoints", Ordered, func() {
// Stream using the token
w := doRawReq("getTranscodeStream", "mediaId", flacTrackID, "mediaType", "song", "transcodeParams", token)
Expect(w.Code).To(Equal(http.StatusOK))
Expect(spy.LastRequest.Format).To(Equal("mp3"))
Expect(streamerSpy.LastRequest.Format).To(Equal("mp3"))
})
It("passes offset through to stream request", func() {
@@ -645,7 +645,7 @@ var _ = Describe("Transcode Endpoints", Ordered, func() {
w := doRawReq("getTranscodeStream", "mediaId", mp3TrackID, "mediaType", "song",
"transcodeParams", token, "offset", "30")
Expect(w.Code).To(Equal(http.StatusOK))
Expect(spy.LastRequest.Offset).To(Equal(30))
Expect(streamerSpy.LastRequest.Offset).To(Equal(30))
})
})
})