Added test fixtures

This commit is contained in:
konrad 2018-04-13 15:03:22 +02:00 committed by kolaente
parent 5673acdd60
commit 2bc349a33b
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
2 changed files with 8 additions and 1 deletions

View File

@ -0,0 +1,7 @@
-
id: 1
name: 'John Doe'
username: 'user1'
password: '1234'
email: 'johndoe@example.com'
is_admin: true

View File

@ -13,7 +13,7 @@ import (
// MainTest creates the test engine
func MainTest(m *testing.M, pathToRoot string) {
var err error
fixturesDir := filepath.Join(pathToRoot, "models")
fixturesDir := filepath.Join(pathToRoot, "models", "fixtures")
if err = createTestEngine(fixturesDir); err != nil {
fmt.Fprintf(os.Stderr, "Error creating test engine: %v\n", err)
os.Exit(1)