{"modulePath":"github.com/thecodingmachine/gotenberg","version":"v0.0.0-20210725132755-5a98790dd360","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package test\n\nPackage test contains useful functions used across tests.\n\n## Functions\n\n```go\nfunc AssertError(t *testing.T, err error) *xerror.Error\n```\nAssertError validates that given error is of an instance of xerror.Error. If so, returns the instance of xerror.Error.\n\n```go\nfunc AssertStatusCode(t *testing.T, expectedStatusCode int, srv http.Handler, req *http.Request)\n```\nAssertStatusCode checks if the given request returns the expected status code.\n\n```go\nfunc DebugLogger() xlog.Logger\n```\nDebugLogger creates a xlog.Logger with xlog.DebugLevel for our tests.\n\n```go\nfunc DummyEchoContext() echo.Context\n```\nDummyEchoContext creates a echo.Context without anything.\n\n```go\nfunc EchoContextMultipart(t *testing.T) echo.Context\n```\nEchoContextMultipart creates a echo.Context with form files.\n\n```go\nfunc ErrorLogger() xlog.Logger\n```\nErrorLogger creates a xlog.Logger with xlog.ErrorLevel for our tests.\n\n```go\nfunc GenerateDestination() string\n```\nGenerateDestination simply generates a path for a resulting PDF file.\n\n```go\nfunc HTMLFpaths(t *testing.T) []string\n```\nHTMLFpaths return the paths of all files under \"testdata/html\" folder.\n\n```go\nfunc HTMLMultipartForm(t *testing.T, formValues map[string]string) (*bytes.Buffer, string)\n```\nHTMLMultipartForm returns the body for a multipart/form-data request with all files under \"testdata/html\" folder.\n\n```go\nfunc InfoLogger() xlog.Logger\n```\nInfoLogger creates a xlog.Logger with xlog.InfoLevel for our tests.\n\n```go\nfunc MarkdownFpaths(t *testing.T) []string\n```\nMarkdownFpaths return the paths of all files under \"testdata/markdown\" folder.\n\n```go\nfunc MarkdownMultipartForm(t *testing.T, formValues map[string]string) (*bytes.Buffer, string)\n```\nMarkdownMultipartForm returns the body for a multipart/form-data request with all files under \"testdata/markdown\" folder.\n\n```go\nfunc MergeFpaths(t *testing.T) []string\n```\nMergeFpaths return the paths of all files under \"testdata/pdf\" folder.\n\n```go\nfunc MergeMultipartForm(t *testing.T, formValues map[string]string) (*bytes.Buffer, string)\n```\nMergeMultipartForm returns the body for a multipart/form-data request with all files under \"testdata/pdf\" folder.\n\n```go\nfunc OfficeFpaths(t *testing.T) []string\n```\nOfficeFpaths return the paths of all files under \"testdata/office\" folder.\n\n```go\nfunc OfficeMultipartForm(t *testing.T, formValues map[string]string) (*bytes.Buffer, string)\n```\nOfficeMultipartForm returns the body for a multipart/form-data request with all files under \"testdata/office\" folder.\n\n```go\nfunc URLFpaths(t *testing.T) []string\n```\nURLFpaths return the paths of all files under \"testdata/url\" folder.\n\n```go\nfunc URLMultipartForm(t *testing.T, formValues map[string]string) (*bytes.Buffer, string)\n```\nURLMultipartForm returns the body for a multipart/form-data request with all files under \"testdata/url\" folder.\n\n","path":"github.com/thecodingmachine/gotenberg/test","name":"test","synopsis":"Package test contains useful functions used across tests.","isRedistributable":true}
