You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

17 lines
364 B

package models
import (
"testing"
"github.com/arnaucube/gogame/database"
"github.com/stretchr/testify/assert"
)
func TestCreateUser(t *testing.T) {
db, err := database.New("127.0.0.1:27017", "gogametests")
assert.Nil(t, err)
user, err := NewUser(db, "user00", "password00", "user00@email.com")
assert.Nil(t, err)
assert.Equal(t, user.Name, "user00")
}