Documentation ¶
Overview ¶
Package slack contains routines useful for testing slack integrations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateExpectedSlackMessageE ¶
func ValidateExpectedSlackMessageE( t testing.TestingT, token, channelID, expectedText string, historyLimit int, lookBack time.Duration, ) error
ValidateExpectedSlackMessage validates whether a message containing the expected text was posted in the given channel ID, looking back historyLimit messages up to the given duration. For example, if you set (15*time.Minute) as the lookBack parameter with historyLimit set to 50, then this will look back the last 50 messages, up to 15 minutes ago. This expects a slack token to be provided. This returns MessageNotFoundErr when there is no match. For the purposes of matching, this only checks the following blocks: - Section block text - Header block text All other blocks are ignored in the validation. NOTE: This only looks for bot posted messages.
Types ¶
type MessageNotFoundErr ¶
type MessageNotFoundErr struct{}
func (MessageNotFoundErr) Error ¶
func (err MessageNotFoundErr) Error() string