getCoverArt.view working
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"fmt"
|
||||
"github.com/deluan/gosonic/api/responses"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"crypto/md5"
|
||||
)
|
||||
|
||||
func ShouldMatchXML(actual interface{}, expected ...interface{}) string {
|
||||
@@ -43,6 +44,11 @@ func ShouldReceiveError(actual interface{}, expected ...interface{}) string {
|
||||
return ShouldEqual(v.Error.Code, expected[0].(int))
|
||||
}
|
||||
|
||||
func ShouldMatchMD5(actual interface{}, expected ...interface{}) string {
|
||||
a := fmt.Sprintf("%x", md5.Sum(actual.([]byte)))
|
||||
return ShouldEqual(a, expected[0].(string))
|
||||
}
|
||||
|
||||
func UnindentJSON(j []byte) string {
|
||||
var m = make(map[string]interface{})
|
||||
json.Unmarshal(j, &m)
|
||||
|
||||
Reference in New Issue
Block a user