Add testing

This commit is contained in:
Melody Becker 2025-04-14 16:59:59 +02:00
parent 3233f8c27f
commit 06e6d457da
Signed by: mstar
SSH key fingerprint: SHA256:9VAo09aaVNTWKzPW7Hq2LW+ox9OdwmTSHRoD4mlz1yI
14 changed files with 273 additions and 5 deletions

View file

@ -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