refactor runner

This commit is contained in:
Pedro Nasser
2016-08-21 19:40:08 -03:00
parent 3b5ff970df
commit 8b0d0f1e13
11 changed files with 114 additions and 88 deletions

View File

@@ -11,7 +11,7 @@ import (
)
func TestRouteCreate(t *testing.T) {
New(&datastore.Mock{}, &models.Config{})
New(&models.Config{}, &datastore.Mock{}, testRunner(t))
router := testRouter()
for i, test := range []struct {
@@ -52,7 +52,7 @@ func TestRouteCreate(t *testing.T) {
}
func TestRouteDelete(t *testing.T) {
New(&datastore.Mock{}, &models.Config{})
New(&models.Config{}, &datastore.Mock{}, testRunner(t))
router := testRouter()
for i, test := range []struct {
@@ -83,7 +83,7 @@ func TestRouteDelete(t *testing.T) {
}
func TestRouteList(t *testing.T) {
New(&datastore.Mock{}, &models.Config{})
New(&models.Config{}, &datastore.Mock{}, testRunner(t))
router := testRouter()
for i, test := range []struct {
@@ -113,7 +113,7 @@ func TestRouteList(t *testing.T) {
}
func TestRouteGet(t *testing.T) {
New(&datastore.Mock{}, &models.Config{})
New(&models.Config{}, &datastore.Mock{}, testRunner(t))
router := testRouter()
for i, test := range []struct {
@@ -143,7 +143,7 @@ func TestRouteGet(t *testing.T) {
}
func TestRouteUpdate(t *testing.T) {
New(&datastore.Mock{}, &models.Config{})
New(&models.Config{}, &datastore.Mock{}, testRunner(t))
router := testRouter()
for i, test := range []struct {