quintodrome/api/get_music_folders_test.go

24 lines
597 B
Go
Raw Normal View History

2016-02-27 14:42:08 -09:00
package api_test
import (
2016-02-25 14:52:07 -09:00
"testing"
. "github.com/deluan/gosonic/tests"
2016-03-02 09:18:39 -09:00
. "github.com/smartystreets/goconvey/convey"
)
func TestGetMusicFolders(t *testing.T) {
Init(t, false)
2016-02-27 14:42:08 -09:00
2016-02-24 14:24:06 -09:00
_, w := Get(AddParams("/rest/getMusicFolders.view"), "TestGetMusicFolders")
Convey("Subject: GetMusicFolders Endpoint", t, func() {
Convey("Status code should be 200", func() {
So(w.Code, ShouldEqual, 200)
})
2016-02-24 15:14:48 -09:00
Convey("The response should include the default folder", func() {
So(UnindentJSON(w.Body.Bytes()), ShouldContainSubstring, `{"musicFolder":[{"id":"0","name":"iTunes Library"}]}`)
2016-02-24 15:14:48 -09:00
})
})
}