Documentation ¶
Index ¶
- func DB(t *testing.T) *dbcontext.DB
- func Endpoint(t *testing.T, router *routing.Router, tc APITestCase)
- func MockRouter(logger log.Logger) *routing.Router
- func MockRoutingContext(req *http.Request) (*routing.Context, *httptest.ResponseRecorder)
- func ResetTables(t *testing.T, db *dbcontext.DB, tables ...string)
- type APITestCase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Endpoint ¶
func Endpoint(t *testing.T, router *routing.Router, tc APITestCase)
Endpoint tests an HTTP endpoint using the given APITestCase spec.
func MockRouter ¶
MockRouter creates a routing.Router for testing APIs.
func MockRoutingContext ¶
MockRoutingContext creates a routing.Conext for testing handlers.
Types ¶
Directories ¶
Path | Synopsis |
---|---|
apifakes
|
|
beer-apifakes
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
Click to show internal directories.
Click to hide internal directories.