This commit is contained in:
Deluan
2016-02-25 18:52:07 -05:00
parent a1829d432a
commit e760952263
17 changed files with 40 additions and 59 deletions
+2 -3
View File
@@ -1,11 +1,11 @@
package api_test
import (
"testing"
"encoding/xml"
_ "github.com/deluan/gosonic/routers"
. "github.com/deluan/gosonic/tests"
"encoding/xml"
. "github.com/smartystreets/goconvey/convey"
"testing"
)
func TestGetLicense(t *testing.T) {
@@ -24,4 +24,3 @@ func TestGetLicense(t *testing.T) {
})
}
+2 -3
View File
@@ -1,12 +1,12 @@
package api_test
import (
"testing"
_ "github.com/deluan/gosonic/routers"
. "github.com/deluan/gosonic/tests"
"testing"
. "github.com/smartystreets/goconvey/convey"
"encoding/xml"
. "github.com/smartystreets/goconvey/convey"
)
func TestGetMusicFolders(t *testing.T) {
@@ -24,4 +24,3 @@ func TestGetMusicFolders(t *testing.T) {
})
})
}
+3 -4
View File
@@ -1,12 +1,12 @@
package api_test
import (
"testing"
"encoding/xml"
_ "github.com/deluan/gosonic/routers"
. "github.com/smartystreets/goconvey/convey"
"github.com/deluan/gosonic/api/responses"
_ "github.com/deluan/gosonic/routers"
. "github.com/deluan/gosonic/tests"
. "github.com/smartystreets/goconvey/convey"
"testing"
)
func TestPing(t *testing.T) {
@@ -28,4 +28,3 @@ func TestPing(t *testing.T) {
})
}
+2 -4
View File
@@ -1,12 +1,12 @@
package api_test
import (
"testing"
"encoding/xml"
"github.com/deluan/gosonic/api/responses"
_ "github.com/deluan/gosonic/routers"
. "github.com/deluan/gosonic/tests"
. "github.com/smartystreets/goconvey/convey"
"github.com/deluan/gosonic/api/responses"
"testing"
)
func TestCheckParams(t *testing.T) {
@@ -44,5 +44,3 @@ func TestAuthentication(t *testing.T) {
})
})
}
+6 -7
View File
@@ -3,23 +3,23 @@ package test
import (
"fmt"
"github.com/astaxie/beego"
"net/http/httptest"
"net/http"
"net/http/httptest"
"os"
"path/filepath"
"runtime"
"os"
)
const (
testUser = "deluan"
testUser = "deluan"
testPassword = "wordpass"
testClient = "test"
testVersion = "1.0.0"
testClient = "test"
testVersion = "1.0.0"
)
func init() {
_, file, _, _ := runtime.Caller(1)
appPath, _ := filepath.Abs(filepath.Dir(filepath.Join(file, ".." + string(filepath.Separator))))
appPath, _ := filepath.Abs(filepath.Dir(filepath.Join(file, ".."+string(filepath.Separator))))
beego.TestBeegoInit(appPath)
noLog := os.Getenv("NOLOG")
@@ -41,4 +41,3 @@ func Get(url string, testCase string) (*http.Request, *httptest.ResponseRecorder
return r, w
}