1
0

Added tests for namespaces

This commit is contained in:
kolaente
2018-07-27 15:52:50 +02:00
parent ba606515d1
commit 628f3eee64
5 changed files with 96 additions and 6 deletions

View File

@ -1,13 +1,12 @@
package models
import (
"fmt"
"github.com/stretchr/testify/assert"
"testing"
)
func TestListItem_Create(t *testing.T) {
assert.NoError(t, PrepareTestDatabase())
//assert.NoError(t, PrepareTestDatabase())
// Fake list item
listitem := ListItem{
@ -71,6 +70,5 @@ func TestListItem_Create(t *testing.T) {
listitem.ListID = 1
err = listitem.Create(nUser)
assert.Error(t, err)
fmt.Println(err)
assert.True(t, IsErrUserDoesNotExist(err))
}