mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-07 06:27:36 +03:00
Started the implementation of getMusicDirectory. Probably will need to introduce a new 'service' layer...
This commit is contained in:
parent
68786d4b39
commit
9577d9ae87
15 changed files with 166 additions and 16 deletions
|
@ -3,7 +3,6 @@ package api_test
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"encoding/xml"
|
||||
"github.com/deluan/gosonic/api/responses"
|
||||
"github.com/deluan/gosonic/consts"
|
||||
"github.com/deluan/gosonic/domain"
|
||||
|
@ -39,17 +38,13 @@ func TestGetIndexes(t *testing.T) {
|
|||
mockRepo.SetError(true)
|
||||
_, w := Get(AddParams("/rest/getIndexes.view", "ifModifiedSince=0"), "TestGetIndexes")
|
||||
|
||||
v := responses.Subsonic{}
|
||||
xml.Unmarshal(w.Body.Bytes(), &v)
|
||||
So(v.Status, ShouldEqual, "fail")
|
||||
So(w.Body, ShouldReceiveError, responses.ERROR_GENERIC)
|
||||
})
|
||||
Convey("Return fail on Property Table error", func() {
|
||||
propRepo.SetError(true)
|
||||
_, w := Get(AddParams("/rest/getIndexes.view"), "TestGetIndexes")
|
||||
|
||||
v := responses.Subsonic{}
|
||||
xml.Unmarshal(w.Body.Bytes(), &v)
|
||||
So(v.Status, ShouldEqual, "fail")
|
||||
So(w.Body, ShouldReceiveError, responses.ERROR_GENERIC)
|
||||
})
|
||||
Convey("When the index is empty", func() {
|
||||
_, w := Get(AddParams("/rest/getIndexes.view"), "TestGetIndexes")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue