Add created and changed fields to playlists responses

This commit is contained in:
Deluan
2020-04-11 16:45:21 -04:00
parent 803a5776ae
commit e232c5c561
12 changed files with 163 additions and 68 deletions
+12 -1
View File
@@ -235,9 +235,20 @@ var _ = Describe("Responses", func() {
})
Context("with data", func() {
timestamp, _ := time.Parse(time.RFC3339, "2020-04-11T16:43:00Z04:00")
BeforeEach(func() {
pls := make([]Playlist, 2)
pls[0] = Playlist{Id: "111", Name: "aaa"}
pls[0] = Playlist{
Id: "111",
Name: "aaa",
Comment: "comment",
SongCount: 2,
Duration: 120,
Public: true,
Owner: "admin",
Created: &timestamp,
Changed: &timestamp,
}
pls[1] = Playlist{Id: "222", Name: "bbb"}
response.Playlists.Playlist = pls
})