auth/internal/domain/profile.go

26 lines
525 B
Go
Raw Normal View History

package domain
2021-12-29 20:08:30 +00:00
import (
"testing"
)
// Profile describes the data about the user.
type Profile struct {
2021-12-29 20:08:30 +00:00
Photo []*URL
URL []*URL
2022-01-08 20:07:14 +00:00
Email []*Email
2021-12-29 20:08:30 +00:00
Name []string
}
2021-12-29 20:08:30 +00:00
// TestProfile returns a valid Profile with the generated test data filled in.
func TestProfile(tb testing.TB) *Profile {
tb.Helper()
return &Profile{
2022-01-08 20:07:14 +00:00
Email: []*Email{TestEmail(tb)},
2021-12-29 20:08:30 +00:00
Name: []string{"Example User"},
Photo: []*URL{TestURL(tb, "https://user.example.net/photo.jpg")},
URL: []*URL{TestURL(tb, "https://user.example.net/")},
}
}