fix routes register test

This commit is contained in:
Steffen Vogel 2020-11-13 10:48:55 +01:00
parent 38c589375a
commit 51dfcbed21

View file

@ -23,12 +23,13 @@
package routes
import (
"os"
"testing"
"git.rwth-aachen.de/acs/public/villas/web-backend-go/configuration"
"git.rwth-aachen.de/acs/public/villas/web-backend-go/database"
"github.com/gin-gonic/gin"
"github.com/stretchr/testify/assert"
"os"
"testing"
)
var router *gin.Engine
@ -59,6 +60,11 @@ func TestRegisterEndpoints(t *testing.T) {
}
func TestAddTestData(t *testing.T) {
resp, err := AddTestData("/api", router)
err := configuration.InitConfig()
if err != nil {
panic(t)
}
resp, err := AddTestData(configuration.GolbalConfig, router)
assert.NoError(t, err, "Response body: %v", resp)
}