Documentation ¶
Index ¶
- Constants
- func CheckHTTPErrorMessage(t *testing.T, err error, message string)
- func Init()
- func LoginTestGet(t *testing.T, o func(h *handler.Handler, e echo.Context) error)
- func MakeRandomStr(digit uint32) (string, error)
- type TestBio
- type TestLink
- type TestNotice
- type TestProduct
- type TestTool
- func (c *TestTool) ClearBio(ctx context.Context) error
- func (c *TestTool) ClearLink(ctx context.Context) error
- func (c *TestTool) ClearLocation(ctx context.Context) error
- func (c *TestTool) ClearNotice(ctx context.Context) error
- func (c *TestTool) ClearProduct(ctx context.Context) error
- func (c *TestTool) ClearUser(ctx context.Context) error
- func (c *TestTool) Close()
- func (c *TestTool) GetUserIds() []uint32
- func (c *TestTool) Handler() (*handler.Handler, error)
- func (c *TestTool) NewForm() (*sender.SendForm, error)
- func (c *TestTool) NewUser(ctx context.Context) (*TestUser, error)
- type TestUser
- func (c *TestUser) CreateBio() (*TestBio, error)
- func (c *TestUser) CreateDB(ctx context.Context, db *db.DB) error
- func (c *TestUser) CreateLink() (*TestLink, error)
- func (c *TestUser) CreateNotice() (*TestNotice, error)
- func (c *TestUser) CreateProduct() (*TestProduct, error)
- func (c *TestUser) CreateSession(ctx context.Context, db *db.DB) (uuid.UUID, error)
- func (c *TestUser) HandlerSession(ctx context.Context, db *db.DB, m *easy.MockHandler) error
- func (c *TestUser) SelectStatus(ctx context.Context, db *db.DB, s bool) error
Constants ¶
View Source
const UNDEFINED_CATEGORY_ID uint32 = 1000000000
View Source
const UNDEFINED_LOCATION_ID uint32 = 1000000000
Variables ¶
This section is empty.
Functions ¶
func LoginTestGet ¶
func MakeRandomStr ¶
Types ¶
type TestBio ¶
type TestBio struct { UserId uint32 IsPublic bool LocationId uint32 Position string PositionJa string Join time.Time Leave time.Time LocationType location.Type LocationName string LocationNameJa string LocationAddress string LocationAddressJa string Biography *ent.Biography Location *ent.Location }
func NewTestBio ¶
type TestLink ¶
type TestLink struct { UserId uint32 Name string NameJa string SiteURL string FaviconURL string CategoryId uint32 CategoryName string CategoryNameJa string Emoji string Link *ent.Link Category *ent.Category }
func NewTestLink ¶
func (*TestLink) CreateCategoryDB ¶
type TestNotice ¶
type TestNotice struct { UserId uint32 DiscordWebhook string SlackWebhook string Mail string Notice *ent.Notice }
func NewTestNotice ¶
func NewTestNotice(userId uint32) (*TestNotice, error)
type TestProduct ¶
type TestProduct struct { UserId uint32 Name string NameJa string Detail string DetailJa string SiteURL string GithubURL string DevTime time.Time Thumbnail string Product *ent.Product }
func NewTestProduct ¶
func NewTestProduct(userId uint32) (*TestProduct, error)
type TestUser ¶
type TestUser struct { GivenName string FamilyName string UserId string Mail string BirthDate time.Time GivenNameJa string FamilyNameJa string Location string LocationJa string AvatarURL string SSOToken string User *ent.User Session *ent.Session }
func (*TestUser) CreateLink ¶
func (*TestUser) CreateNotice ¶
func (c *TestUser) CreateNotice() (*TestNotice, error)
func (*TestUser) CreateProduct ¶
func (c *TestUser) CreateProduct() (*TestProduct, error)
func (*TestUser) CreateSession ¶
Create user session returns uuid is session token
func (*TestUser) HandlerSession ¶
Click to show internal directories.
Click to hide internal directories.