Documentation ¶
Index ¶
- func CreateBleveTestIndex(testname string) (string, func())
- func CreateSqliteTestDB(name string) (*sqlx.DB, func(), error)
- func EqualError(a, b error) bool
- func InitDockerPool(t *testing.T) *dockertest.Pool
- type Mail
- type MailHogClient
- type MailHogMessage
- type Mailer
- type Notification
- type Notifier
- type TestQueue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateBleveTestIndex ¶
CreateBleveTestIndex creates a bleve index name with the given testname and a function to remove the index.
func CreateSqliteTestDB ¶
CreateSqliteTestDB creates an in memory sqlite database.
func EqualError ¶
EqualError reports whether errors a and b are considered equal. They're equal if both are nil, or both are not nil and a.Error() == b.Error().
func InitDockerPool ¶
Types ¶
type MailHogClient ¶
type MailHogClient struct {
URL string
}
func RunMailHog ¶
func RunMailHog(t *testing.T, pool *dockertest.Pool) (string, MailHogClient)
func (MailHogClient) GetLastEmail ¶
func (c MailHogClient) GetLastEmail() (MailHogMessage, error)
func (MailHogClient) V1GetMessages ¶
func (m MailHogClient) V1GetMessages() ([]MailHogMessage, error)
func (MailHogClient) WantLastEmailToBe ¶
type MailHogMessage ¶
type MailHogMessage struct { ID string From struct { Relays string Mailbox string Domain string Params string } To []struct { Relays string Mailbox string Domain string Params string } Content struct { Headers map[string][]string Body string Size int Mime string } Created time.Time Mime string Raw struct { From string To []string Data string Helo string } }
type Notification ¶
type Notification struct { UserID string Subject string Message string Link notification.Link }
type Notifier ¶
type Notifier struct {
Notifications []Notification
}
func NewNotifier ¶
func NewNotifier() *Notifier
type TestQueue ¶
type TestQueue struct {
// contains filtered or unexported fields
}
func NewTestQueue ¶
func NewTestQueue() *TestQueue
func (*TestQueue) AddSubscriber ¶
func (q *TestQueue) AddSubscriber(consume oqueue.OperationConsumer, worker int)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.