Added test
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
package user
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
|
||||
type UserProfile struct {
|
||||
Usr *User `json:"user"`
|
||||
@@ -22,3 +26,12 @@ func InitUserProfile(usr *User) (usrProfile *UserProfile, done bool) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestInitUserProfile(t *testing.T) {
|
||||
usr := User{}
|
||||
usr.username = "Bob"
|
||||
usr.Phone = "+12224572351"
|
||||
usr.Password = "TheNight!"
|
||||
profile, done := InitUserProfile(&usr)
|
||||
t.Assert(done, true, "Error")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user