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

View File

@ -6,9 +6,9 @@ import (
"github.com/deluan/gosonic/api/responses"
"github.com/deluan/gosonic/consts"
"github.com/deluan/gosonic/domain"
. "github.com/deluan/gosonic/tests"
"github.com/deluan/gosonic/tests/mocks"
"github.com/deluan/gosonic/utils"
. "github.com/deluan/gosonic/tests"
. "github.com/smartystreets/goconvey/convey"
)

View File

@ -1,11 +1,11 @@
package api
import (
"github.com/astaxie/beego"
"github.com/deluan/gosonic/api/responses"
"github.com/deluan/gosonic/domain"
"github.com/deluan/gosonic/utils"
"github.com/karlkfi/inject"
"github.com/astaxie/beego"
)
type GetMusicDirectoryController struct {

View File

@ -3,12 +3,12 @@ package api_test
import (
"testing"
"github.com/deluan/gosonic/api/responses"
"github.com/deluan/gosonic/domain"
. "github.com/deluan/gosonic/tests"
"github.com/deluan/gosonic/tests/mocks"
"github.com/deluan/gosonic/utils"
. "github.com/deluan/gosonic/tests"
. "github.com/smartystreets/goconvey/convey"
"github.com/deluan/gosonic/api/responses"
)
func TestGetMusicDirectory(t *testing.T) {

View File

@ -1,11 +1,11 @@
package api_test
import (
"encoding/json"
"github.com/deluan/gosonic/api/responses"
. "github.com/deluan/gosonic/tests"
. "github.com/smartystreets/goconvey/convey"
"testing"
"encoding/json"
)
func TestPing(t *testing.T) {

View File

@ -1,10 +1,10 @@
package responses_test
import (
"testing"
. "github.com/smartystreets/goconvey/convey"
. "github.com/deluan/gosonic/tests"
. "github.com/deluan/gosonic/api/responses"
. "github.com/deluan/gosonic/tests"
. "github.com/smartystreets/goconvey/convey"
"testing"
)
func TestSubsonicResponses(t *testing.T) {

View File

@ -4,9 +4,9 @@ import (
"github.com/dhowden/itl"
"net/url"
"os"
"strings"
"path/filepath"
"strconv"
"strings"
)
type ItunesScanner struct{}

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 {

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
}

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
}

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
}