Documentation
¶
Index ¶
- func AssertGetSupplierResponse(t *testing.T, recorder *httptest.ResponseRecorder)
- func AssertTokenResponse(t *testing.T, testCase TestCaseValidateToken, ...)
- func AssertUserProfileResponse(t *testing.T, recorder *httptest.ResponseRecorder)
- func PrepareHandlerTestCase(test TestCaseHandler) (request *http.Request, recorder *httptest.ResponseRecorder)
- type ExpectedResponse
- type Request
- type TestCaseGetBearerToken
- type TestCaseHandler
- type TestCaseMiddleware
- type TestCaseTokenHandler
- type TestCaseUserCreate
- type TestCaseUserGetByID
- type TestCaseValidateToken
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertGetSupplierResponse ¶
func AssertGetSupplierResponse(t *testing.T, recorder *httptest.ResponseRecorder)
func AssertTokenResponse ¶
func AssertTokenResponse(t *testing.T, testCase TestCaseValidateToken, gotClaims *helper.JwtCustomClaims, err error)
func AssertUserProfileResponse ¶
func AssertUserProfileResponse(t *testing.T, recorder *httptest.ResponseRecorder)
func PrepareHandlerTestCase ¶
func PrepareHandlerTestCase(test TestCaseHandler) (request *http.Request, recorder *httptest.ResponseRecorder)
Types ¶
type ExpectedResponse ¶
type TestCaseGetBearerToken ¶
type TestCaseHandler ¶
type TestCaseHandler struct { TestName string Request Request Body string HandlerFunc func(w http.ResponseWriter, r *http.Request) Want ExpectedResponse }
type TestCaseMiddleware ¶
type TestCaseMiddleware struct { TestName string Request Request HeaderName string HeaderValue string Want ExpectedResponse }
type TestCaseTokenHandler ¶
type TestCaseTokenHandler struct { TestName string Request Request Body *requests.LoginRequest HandlerFunc func(w http.ResponseWriter, r *http.Request) Want ExpectedResponse }
type TestCaseUserCreate ¶
type TestCaseUserGetByID ¶
Click to show internal directories.
Click to hide internal directories.