Documentation ¶
Index ¶
- Variables
- func AssertEqual(t *testing.T, name string, expected, got interface{})
- func AssertResponseCode(t *testing.T, expected, actual int)
- func ClearAllTables(t *testing.T, tables []string)
- func CreateNewEntity[T any](t *testing.T, url string, entity T)
- func ExecuteHTTPRequest(req *http.Request) *httptest.ResponseRecorder
- func InitDBAndRouter(t *testing.T)
- func NewHTTPRequest(t *testing.T, method, url string, body interface{}) *http.Request
- func ParseResponseData[T any](t *testing.T, res *httptest.ResponseRecorder) []T
- func UnmarshalResponse(t *testing.T, res *httptest.ResponseRecorder) utils.Response
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Router *mux.Router DB *gorm.DB )
Functions ¶
func AssertEqual ¶
func AssertResponseCode ¶
func ClearAllTables ¶
func ExecuteHTTPRequest ¶
func ExecuteHTTPRequest(req *http.Request) *httptest.ResponseRecorder
func InitDBAndRouter ¶
func NewHTTPRequest ¶
func ParseResponseData ¶
func ParseResponseData[T any](t *testing.T, res *httptest.ResponseRecorder) []T
func UnmarshalResponse ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.