More getMusicDirectory

This commit is contained in:
Deluan
2016-03-02 20:50:16 -05:00
parent 9577d9ae87
commit 4f5af423a8
4 changed files with 63 additions and 16 deletions
+6 -1
View File
@@ -27,6 +27,12 @@ func ShouldMatchJSON(actual interface{}, expected ...interface{}) string {
return ShouldEqual(s, expected[0].(string))
}
func ShouldContainJSON(actual interface{}, expected ...interface{}) string {
a := UnindentJSON(actual.(*bytes.Buffer).Bytes())
return ShouldContainSubstring(a, expected[0].(string))
}
func ShouldReceiveError(actual interface{}, expected ...interface{}) string {
v := responses.Subsonic{}
err := xml.Unmarshal(actual.(*bytes.Buffer).Bytes(), &v)
@@ -35,7 +41,6 @@ func ShouldReceiveError(actual interface{}, expected ...interface{}) string {
}
return ShouldEqual(v.Error.Code, expected[0].(int))
}
func UnindentJSON(j []byte) string {