Convert internal disc number representation to int
This commit is contained in:
@@ -45,9 +45,9 @@ var _ = Describe("helpers", func() {
|
||||
|
||||
It("should return correct disc titles when album has discs with valid disc numbers", func() {
|
||||
album := model.Album{
|
||||
Discs: map[string]string{
|
||||
"1": "Disc 1",
|
||||
"2": "Disc 2",
|
||||
Discs: map[int]string{
|
||||
1: "Disc 1",
|
||||
2: "Disc 2",
|
||||
},
|
||||
}
|
||||
expected := responses.DiscTitles{
|
||||
@@ -56,18 +56,5 @@ var _ = Describe("helpers", func() {
|
||||
}
|
||||
Expect(buildDiscSubtitles(context.Background(), album)).To(Equal(expected))
|
||||
})
|
||||
|
||||
It("should skip discs with invalid disc numbers", func() {
|
||||
album := model.Album{
|
||||
Discs: map[string]string{
|
||||
"1": "Disc 1",
|
||||
"two": "Disc 2",
|
||||
},
|
||||
}
|
||||
expected := responses.DiscTitles{
|
||||
{Disc: 1, Title: "Disc 1"},
|
||||
}
|
||||
Expect(buildDiscSubtitles(context.Background(), album)).To(Equal(expected))
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user