slash v2.0.0-rc.2 Slash.Test View Source

Use this module for testing your plugs built with Slash.Builder.

  use Slash.Test, signing_key: "foo"

Link to this section Summary

Functions

Builds a %Conn{} body for a specific Slack command payload

Link to this section Functions

Link to this function

send_command(conn, module, command) View Source
send_command(Plug.Conn.t(), module :: atom(), command :: String.t()) ::
  Plug.Conn.t()

Builds a %Conn{} body for a specific Slack command payload.

If a :signer_key has not been configured for the test module, a key will be generated and put into the application environment.

NOTE: This is a little awkward right now due to having to send the mock module as an argument.