Test fixes
This commit is contained in:
@@ -2,6 +2,8 @@ package user
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/stretchr/testify/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -29,9 +31,10 @@ func InitUserProfile(usr *User) (usrProfile *UserProfile, done bool) {
|
|||||||
|
|
||||||
func TestInitUserProfile(t *testing.T) {
|
func TestInitUserProfile(t *testing.T) {
|
||||||
usr := User{}
|
usr := User{}
|
||||||
usr.username = "Bob"
|
usr.Username = "Bob"
|
||||||
usr.Phone = "+12224572351"
|
usr.PhoneNumber = "+12224572351"
|
||||||
usr.Password = "TheNight!"
|
usr.Password = "TheNight!"
|
||||||
profile, done := InitUserProfile(&usr)
|
profile, done := InitUserProfile(&usr)
|
||||||
t.Assert(done, true, "Error")
|
assert.Equal(t, done, true, "Error")
|
||||||
|
assert.NotEmpty(t, profile, "UserProfile is empty")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user