Add testing
This commit is contained in:
parent
3233f8c27f
commit
06e6d457da
14 changed files with 273 additions and 5 deletions
|
@ -44,11 +44,13 @@ type User struct {
|
|||
var _ shared.Sanitisable = &User{}
|
||||
var _ shared.Clonable = &User{}
|
||||
|
||||
// No test due to no fancy processing, just setting values to constants
|
||||
func (u *User) Sanitize() {
|
||||
u.Verified = nil
|
||||
u.FinishedRegistration = nil
|
||||
}
|
||||
|
||||
// No test, no data processing, only copy
|
||||
func (u *User) Clone() shared.Clonable {
|
||||
user := *u
|
||||
if u.IconId != nil {
|
||||
|
@ -83,6 +85,7 @@ func (u *User) Clone() shared.Clonable {
|
|||
return &user
|
||||
}
|
||||
|
||||
// No test, no data processing, only copy
|
||||
func (u *User) FromModel(m *models.User) {
|
||||
u.ID = m.ID
|
||||
u.CreatedAt = m.CreatedAt
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue