Documentation
¶
Index ¶
- func MockAddUserToChain(t *testing.T, db *gorm.DB, chainID uint, user *models.User, ...) *sharedtypes.UserChain
- func MockBag(t *testing.T, db *gorm.DB, chainID, userID uint, o MockBagOptions) *models.Bag
- func MockChainAndUser(t *testing.T, db *gorm.DB, o MockChainAndUserOptions) (chain *models.Chain, user *models.User, token string)
- func MockEvent(t *testing.T, db *gorm.DB, userID, chainID uint) (event *models.Event)
- func MockGenders(zeroOrMore bool) (genders []string)
- func MockGinContext(db *gorm.DB, method string, url string, bodyJSON *gin.H, token string) (*gin.Context, func() mockGinContextResponse)
- func MockMail(t *testing.T, db *gorm.DB, o MockMailOptions) (mail *models.Mail)
- func MockSizes(zeroOrMore bool) []string
- func MockUser(t *testing.T, db *gorm.DB, chainID uint, o MockChainAndUserOptions) (user *models.User, token string)
- type Coordinates
- type MockBagOptions
- type MockChainAndUserOptions
- type MockEventOptions
- type MockMailOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MockAddUserToChain ¶
func MockAddUserToChain(t *testing.T, db *gorm.DB, chainID uint, user *models.User, o MockChainAndUserOptions) *sharedtypes.UserChain
func MockChainAndUser ¶
func MockGenders ¶
func MockGinContext ¶
Types ¶
type Coordinates ¶
func FakeDutchCoordinates ¶
func FakeDutchCoordinates() Coordinates
type MockBagOptions ¶
type MockBagOptions struct {
BagNameOverride string
}
type MockChainAndUserOptions ¶
type MockChainAndUserOptions struct {
IsNotEmailVerified bool
IsNotTokenVerified bool
IsNotApproved bool
IsRootAdmin bool
IsChainAdmin bool
IsNotPublished bool
IsOpenToNewMembers bool
IsPausedLoopOnly bool
RoutePrivacy *int
RouteOrderIndex int
// for generating new members
IsNotActive bool
OnlyEmailExampleCom bool
OverrideLongitude *float64
OverrideLatitude *float64
}
some options are negatives of the used value this is to keep the defaults to false when not specifically used
type MockEventOptions ¶
type MockEventOptions struct {
IsNotPublished bool
}
Click to show internal directories.
Click to hide internal directories.