Parse correctly playlist CoverArt ids
This commit is contained in:
@@ -19,6 +19,12 @@ var _ = Describe("ParseArtworkID()", func() {
|
||||
Expect(id.Kind).To(Equal(model.KindMediaFileArtwork))
|
||||
Expect(id.ID).To(Equal("a6f8d2b1"))
|
||||
})
|
||||
It("parses playlists artwork ids", func() {
|
||||
id, err := model.ParseArtworkID("pl-18690de0-151b-4d86-81cb-f418a907315a")
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(id.Kind).To(Equal(model.KindPlaylistArtwork))
|
||||
Expect(id.ID).To(Equal("18690de0-151b-4d86-81cb-f418a907315a"))
|
||||
})
|
||||
It("fails to parse malformed ids", func() {
|
||||
_, err := model.ParseArtworkID("a6f8d2b1")
|
||||
Expect(err).To(MatchError("invalid artwork id"))
|
||||
|
||||
Reference in New Issue
Block a user