gogmagog/models/user_test.go
Deepak 3ea8603368
All checks were successful
gitea-deepak/gogmagog/pipeline/head This commit looks good
Adds user table and adds support for config flag to drop DB on restart
2021-01-11 20:15:36 -06:00

23 lines
442 B
Go

package models_test
import (
"gitea.deepak.science/deepak/gogmagog/models"
"github.com/stretchr/testify/assert"
"testing"
)
func TestModelUsers(t *testing.T) {
assert := assert.New(t)
a1 := &models.Action{ActionID: 3}
a2 := &models.Action{ActionID: 4}
p := &models.Plan{PlanID: 6}
ss := &multiStore{
[]*models.Action{a1, a2},
[]*models.Plan{p}}
m := models.New(ss)
user, err := m.User(3)
assert.Nil(err)
assert.Nil(user)
}