Documentation
¶
Overview ¶
Package slacktest is a fake Slack Web API for tests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Response ¶
Response lets a handler set the HTTP status and headers of its answer. A zero Status means 200.
type Server ¶
type Server struct {
// URL is the base URL to use as slack.Client.BaseURL.
URL string
// contains filtered or unexported fields
}
func New ¶
New starts a fake Slack closed when t ends. A method without a handler answers {"ok": false, "error": "unknown_method"}, as Slack does.
func (*Server) Authorization ¶
Authorization returns the bearer token of every request received for method ("" when absent).
func (*Server) Calls ¶
Calls returns the form of every request received for method, rate-limited ones included.
func (*Server) Close ¶
func (s *Server) Close()
Close stops the server early, so calls fail at the transport.