Documentation ¶
Overview ¶
Package assertaction provides testing functions for validation a plugin action's behavior
Index ¶
- func MatchesAndAnswers(t *testing.T, action slackscot.ActionDefinition, m *slackscot.IncomingMessage, ...) bool
- func MatchesAndEmojiReacts(t *testing.T, plugin *slackscot.Plugin, action slackscot.ActionDefinition, ...) bool
- func NotMatch(t *testing.T, action slackscot.ActionDefinition, m *slackscot.IncomingMessage) bool
- type AnswerValidator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MatchesAndAnswers ¶
func MatchesAndAnswers(t *testing.T, action slackscot.ActionDefinition, m *slackscot.IncomingMessage, validateAnswer AnswerValidator) bool
MatchesAndAnswers asserts that the action.Match is true and gets the action's answer to be further validated by AnswerValidator
func MatchesAndEmojiReacts ¶ added in v1.9.0
func MatchesAndEmojiReacts(t *testing.T, plugin *slackscot.Plugin, action slackscot.ActionDefinition, m *slackscot.IncomingMessage, expectedEmojis ...string) bool
MatchesAndEmojiReacts asserts that the action.Match is true and validates that expected emojis reactions are added to the message
func NotMatch ¶
func NotMatch(t *testing.T, action slackscot.ActionDefinition, m *slackscot.IncomingMessage) bool
NotMatch asserts that action.Match is false
Types ¶
Click to show internal directories.
Click to hide internal directories.