This commit is contained in:
Deluan
2016-03-03 00:46:23 -05:00
parent ffd6304a23
commit 012958cd08
14 changed files with 63 additions and 63 deletions
+3 -3
View File
@@ -1,12 +1,12 @@
package tests
import (
. "github.com/smartystreets/goconvey/convey"
"bytes"
"encoding/json"
"encoding/xml"
"fmt"
"github.com/deluan/gosonic/api/responses"
"bytes"
. "github.com/smartystreets/goconvey/convey"
)
func ShouldMatchXML(actual interface{}, expected ...interface{}) string {
@@ -48,4 +48,4 @@ func UnindentJSON(j []byte) string {
json.Unmarshal(j, &m)
s, _ := json.Marshal(m)
return string(s)
}
}
+3 -3
View File
@@ -2,9 +2,9 @@ package mocks
import (
"encoding/json"
"errors"
"fmt"
"github.com/deluan/gosonic/domain"
"errors"
)
func CreateMockAlbumRepo() *MockAlbum {
@@ -37,7 +37,7 @@ func (m *MockAlbum) Exists(id string) (bool, error) {
if m.err {
return false, errors.New("Error!")
}
_, found := m.data[id];
_, found := m.data[id]
return found, nil
}
@@ -62,4 +62,4 @@ func (m *MockAlbum) FindByArtist(artistId string) ([]domain.Album, error) {
}
return res, nil
}
}
+3 -3
View File
@@ -2,9 +2,9 @@ package mocks
import (
"encoding/json"
"errors"
"fmt"
"github.com/deluan/gosonic/domain"
"errors"
)
func CreateMockArtistRepo() *MockArtist {
@@ -37,7 +37,7 @@ func (m *MockArtist) Exists(id string) (bool, error) {
if m.err {
return false, errors.New("Error!")
}
_, found := m.data[id];
_, found := m.data[id]
return found, nil
}
@@ -46,4 +46,4 @@ func (m *MockArtist) Get(id string) (*domain.Artist, error) {
return nil, errors.New("Error!")
}
return m.data[id], nil
}
}
+3 -3
View File
@@ -2,9 +2,9 @@ package mocks
import (
"encoding/json"
"errors"
"fmt"
"github.com/deluan/gosonic/domain"
"errors"
)
func CreateMockMediaFileRepo() *MockMediaFile {
@@ -37,7 +37,7 @@ func (m *MockMediaFile) Exists(id string) (bool, error) {
if m.err {
return false, errors.New("Error!")
}
_, found := m.data[id];
_, found := m.data[id]
return found, nil
}
@@ -62,4 +62,4 @@ func (m *MockMediaFile) FindByAlbum(artistId string) ([]domain.MediaFile, error)
}
return res, nil
}
}