Add dedicated SimilarArtists call

This commit is contained in:
Deluan
2020-10-20 13:38:44 -04:00
committed by Deluan Quintão
parent 29d8950e5b
commit e9e09a7480
22 changed files with 317 additions and 91 deletions
@@ -361,6 +361,64 @@ var _ = Describe("Responses", func() {
})
})
Describe("SimilarSongs", func() {
BeforeEach(func() {
response.SimilarSongs = &SimilarSongs{}
})
Context("without data", func() {
It("should match .XML", func() {
Expect(xml.Marshal(response)).To(MatchSnapshot())
})
It("should match .JSON", func() {
Expect(json.Marshal(response)).To(MatchSnapshot())
})
})
Context("with data", func() {
BeforeEach(func() {
child := make([]Child, 1)
child[0] = Child{Id: "1", Title: "title", IsDir: false}
response.SimilarSongs.Song = child
})
It("should match .XML", func() {
Expect(xml.Marshal(response)).To(MatchSnapshot())
})
It("should match .JSON", func() {
Expect(json.Marshal(response)).To(MatchSnapshot())
})
})
})
Describe("SimilarSongs2", func() {
BeforeEach(func() {
response.SimilarSongs2 = &SimilarSongs2{}
})
Context("without data", func() {
It("should match .XML", func() {
Expect(xml.Marshal(response)).To(MatchSnapshot())
})
It("should match .JSON", func() {
Expect(json.Marshal(response)).To(MatchSnapshot())
})
})
Context("with data", func() {
BeforeEach(func() {
child := make([]Child, 1)
child[0] = Child{Id: "1", Title: "title", IsDir: false}
response.SimilarSongs2.Song = child
})
It("should match .XML", func() {
Expect(xml.Marshal(response)).To(MatchSnapshot())
})
It("should match .JSON", func() {
Expect(json.Marshal(response)).To(MatchSnapshot())
})
})
})
Describe("PlayQueue", func() {
BeforeEach(func() {
response.PlayQueue = &PlayQueue{}