refactor: small improvements and clean up (#3423)
* refactor: replace custom map functions with slice.Map * refactor: extract StringerValue function * refactor: removed unnecessary if * chore: removed invalid comment * refactor: replace more map functions * chore: fix FFmpeg typo
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
package subsonic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/navidrome/navidrome/model"
|
||||
"github.com/navidrome/navidrome/server/subsonic/responses"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
@@ -40,7 +38,7 @@ var _ = Describe("helpers", func() {
|
||||
Describe("buildDiscTitles", func() {
|
||||
It("should return nil when album has no discs", func() {
|
||||
album := model.Album{}
|
||||
Expect(buildDiscSubtitles(context.Background(), album)).To(BeNil())
|
||||
Expect(buildDiscSubtitles(album)).To(BeNil())
|
||||
})
|
||||
|
||||
It("should return correct disc titles when album has discs with valid disc numbers", func() {
|
||||
@@ -54,7 +52,7 @@ var _ = Describe("helpers", func() {
|
||||
{Disc: 1, Title: "Disc 1"},
|
||||
{Disc: 2, Title: "Disc 2"},
|
||||
}
|
||||
Expect(buildDiscSubtitles(context.Background(), album)).To(Equal(expected))
|
||||
Expect(buildDiscSubtitles(album)).To(Equal(expected))
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user