Documentation ¶
Index ¶
- type Response
- type TestPayload
- type TestingEnv
- func (te *TestingEnv) Expect() string
- func (te *TestingEnv) ExpectedPayload(code int, err error, token string, user interface{}, userList interface{})
- func (te *TestingEnv) Init(s *sql.DB, r *mux.Router)
- func (te *TestingEnv) Prepare(method string, url string)
- func (te *TestingEnv) Request(jsonRequest []byte) TestPayload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Response ¶
type Response struct { Success bool `json:"success"` Error *string `json:"error,omitempty"` Token *string `json:"token,omitempty"` User interface{} `json:"user,omitempty"` UserList interface{} `json:"userList,omitempty"` }
payload response returned from api. this should be passed in as an argument eventually
type TestPayload ¶
test payload containing information about the request. should include response time
type TestingEnv ¶
type TestingEnv struct {
// contains filtered or unexported fields
}
includes everything relevant to making requests to the api directly through the router
func (*TestingEnv) Expect ¶
func (te *TestingEnv) Expect() string
func (*TestingEnv) ExpectedPayload ¶
func (te *TestingEnv) ExpectedPayload(code int, err error, token string, user interface{}, userList interface{})
func (*TestingEnv) Init ¶
func (te *TestingEnv) Init(s *sql.DB, r *mux.Router)
should initalize the database on its own eventually by being passed in a string
func (*TestingEnv) Prepare ¶
func (te *TestingEnv) Prepare(method string, url string)
func (*TestingEnv) Request ¶
func (te *TestingEnv) Request(jsonRequest []byte) TestPayload
Click to show internal directories.
Click to hide internal directories.