mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-29 18:01:36 +03:00
24 lines
597 B
Go
24 lines
597 B
Go
package api_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
. "github.com/deluan/gosonic/tests"
|
|
. "github.com/smartystreets/goconvey/convey"
|
|
)
|
|
|
|
func TestGetMusicFolders(t *testing.T) {
|
|
Init(t, false)
|
|
|
|
_, 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)
|
|
})
|
|
Convey("The response should include the default folder", func() {
|
|
So(UnindentJSON(w.Body.Bytes()), ShouldContainSubstring, `{"musicFolder":[{"id":"0","name":"iTunes Library"}]}`)
|
|
})
|
|
})
|
|
}
|