2021-09-29 20:35:39 +00:00
|
|
|
package domain
|
|
|
|
|
2021-12-29 20:08:30 +00:00
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Profile describes the data about the user.
|
2021-09-29 20:35:39 +00:00
|
|
|
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-09-29 20:35:39 +00:00
|
|
|
}
|
|
|
|
|
2021-12-29 20:08:30 +00:00
|
|
|
// TestProfile returns a valid Profile with the generated test data filled in.
|
2021-09-29 20:35:39 +00:00
|
|
|
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"},
|
2022-01-05 09:55:48 +00:00
|
|
|
Photo: []*URL{TestURL(tb, "https://user.example.net/photo.jpg")},
|
|
|
|
URL: []*URL{TestURL(tb, "https://user.example.net/")},
|
2021-09-29 20:35:39 +00:00
|
|
|
}
|
|
|
|
}
|