🏷️ Added User domain
This commit is contained in:
parent
bf8e0b0e86
commit
9a1bbd4c2c
|
@ -0,0 +1,29 @@
|
||||||
|
package domain
|
||||||
|
|
||||||
|
import "testing"
|
||||||
|
|
||||||
|
type User struct {
|
||||||
|
Me *Me
|
||||||
|
AuthorizationEndpoint *URL
|
||||||
|
IndieAuthMetadata *URL
|
||||||
|
Micropub *URL
|
||||||
|
Microsub *URL
|
||||||
|
TicketEndpoint *URL
|
||||||
|
TokenEndpoint *URL
|
||||||
|
*Profile
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestUser(tb testing.TB) *User {
|
||||||
|
tb.Helper()
|
||||||
|
|
||||||
|
return &User{
|
||||||
|
Me: TestMe(tb),
|
||||||
|
Profile: TestProfile(tb),
|
||||||
|
AuthorizationEndpoint: TestURL(tb, "https://example.org/auth"),
|
||||||
|
IndieAuthMetadata: TestURL(tb, "https://example.org/.well-known/oauth-authorization-server"),
|
||||||
|
Micropub: TestURL(tb, "https://microsub.example.org/"),
|
||||||
|
Microsub: TestURL(tb, "https://micropub.example.org/"),
|
||||||
|
TicketEndpoint: TestURL(tb, "https://example.org/ticket"),
|
||||||
|
TokenEndpoint: TestURL(tb, "https://example.org/token"),
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue