Documentation
¶
Index ¶
- func AssertContainsSlackBlocks(t *testing.T, slackClient *SlackClient, message msg.Ref, block slack.Block)
- func AssertError(slackClient *SlackClient, ref msg.Ref, errorIn interface{})
- func AssertQueuedMessage(t *testing.T, expected msg.Message)
- func AssertReaction(slackClient *SlackClient, reaction string, ref msg.Ref)
- func AssertRemoveReaction(slackClient *SlackClient, reaction string, ref msg.Ref)
- func AssertSlackBlocks(t *testing.T, slackClient *SlackClient, message msg.Ref, expectedJSON string)
- func AssertSlackJSON(t *testing.T, slackClient *SlackClient, message msg.Ref, expected string)
- func AssertSlackMessage(slackClient *SlackClient, ref msg.Ref, text string)
- func LockInternalMessages() *sync.Mutex
- func WaitTillHavingInternalMessage()
- type Client
- type SlackClient
- func (_m *SlackClient) AddReaction(reaction util.Reaction, ref msg.Ref)
- func (_m *SlackClient) CanHandleInteractions() bool
- func (_m *SlackClient) GetConversationHistory(_a0 *slack.GetConversationHistoryParameters) (*slack.GetConversationHistoryResponse, error)
- func (_m *SlackClient) GetReactions(item slack.ItemRef, params slack.GetReactionsParameters) ([]slack.ItemReaction, error)
- func (_m *SlackClient) RemoveReaction(reaction util.Reaction, ref msg.Ref)
- func (_m *SlackClient) ReplyError(ref msg.Ref, err error)
- func (_m *SlackClient) SendBlockMessage(ref msg.Ref, blocks []slack.Block, options ...slack.MsgOption) string
- func (_m *SlackClient) SendMessage(ref msg.Ref, text string, options ...slack.MsgOption) string
- func (_m *SlackClient) SendToUser(user string, text string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertContainsSlackBlocks ¶
func AssertContainsSlackBlocks(t *testing.T, slackClient *SlackClient, message msg.Ref, block slack.Block)
AssertContainsSlackBlocks is a small test helper to check for certain slack.Block
func AssertError ¶
func AssertError(slackClient *SlackClient, ref msg.Ref, errorIn interface{})
AssertError is a test helper which check for calls to "ReplyError"
func AssertQueuedMessage ¶
AssertQueuedMessage checks if a given internal message was queued
func AssertReaction ¶
func AssertReaction(slackClient *SlackClient, reaction string, ref msg.Ref)
AssertReaction is a test helper to expect a given slack reaction to be added
func AssertRemoveReaction ¶
func AssertRemoveReaction(slackClient *SlackClient, reaction string, ref msg.Ref)
AssertRemoveReaction is a test helper to expect a given slack reaction to be removed
func AssertSlackBlocks ¶
func AssertSlackBlocks(t *testing.T, slackClient *SlackClient, message msg.Ref, expectedJSON string)
AssertSlackBlocks test helper to assert a given JSON representation of "Blocks"
func AssertSlackJSON ¶
AssertSlackJSON is a test helper to assert full slack attachments
func AssertSlackMessage ¶
func AssertSlackMessage(slackClient *SlackClient, ref msg.Ref, text string)
AssertSlackMessage is a test helper to check for a given slack message
func LockInternalMessages ¶
LockInternalMessages uses mutex to block other tests dealing with the central message queue
func WaitTillHavingInternalMessage ¶
func WaitTillHavingInternalMessage()
WaitTillHavingInternalMessage blocks until there is a internal message queued
Types ¶
type Client ¶
Client is an autogenerated mock type for the Client type
func (*Client) BuildJob ¶
func (_m *Client) BuildJob(ctx context.Context, name string, params map[string]string) (int64, error)
BuildJob provides a mock function with given fields: ctx, name, params
func (*Client) GetAllNodes ¶
GetAllNodes provides a mock function with given fields: ctx
type SlackClient ¶
SlackClient is an autogenerated mock type for the SlackClient type
func (*SlackClient) AddReaction ¶
func (_m *SlackClient) AddReaction(reaction util.Reaction, ref msg.Ref)
AddReaction provides a mock function with given fields: reaction, ref
func (*SlackClient) CanHandleInteractions ¶
func (_m *SlackClient) CanHandleInteractions() bool
CanHandleInteractions provides a mock function with given fields:
func (*SlackClient) GetConversationHistory ¶
func (_m *SlackClient) GetConversationHistory(_a0 *slack.GetConversationHistoryParameters) (*slack.GetConversationHistoryResponse, error)
GetConversationHistory provides a mock function with given fields: _a0
func (*SlackClient) GetReactions ¶
func (_m *SlackClient) GetReactions(item slack.ItemRef, params slack.GetReactionsParameters) ([]slack.ItemReaction, error)
GetReactions provides a mock function with given fields: item, params
func (*SlackClient) RemoveReaction ¶
func (_m *SlackClient) RemoveReaction(reaction util.Reaction, ref msg.Ref)
RemoveReaction provides a mock function with given fields: reaction, ref
func (*SlackClient) ReplyError ¶
func (_m *SlackClient) ReplyError(ref msg.Ref, err error)
ReplyError provides a mock function with given fields: ref, err
func (*SlackClient) SendBlockMessage ¶
func (_m *SlackClient) SendBlockMessage(ref msg.Ref, blocks []slack.Block, options ...slack.MsgOption) string
SendBlockMessage provides a mock function with given fields: ref, blocks, options
func (*SlackClient) SendMessage ¶
SendMessage provides a mock function with given fields: ref, text, options
func (*SlackClient) SendToUser ¶
func (_m *SlackClient) SendToUser(user string, text string)
SendToUser provides a mock function with given fields: user, text