Files
gotenberg/internal/app/api/markdown_test.go
Julien Neuhart 495203c112 v3.0.0 (#18)
2018-12-10 16:09:19 +01:00

22 lines
511 B
Go

package api
import (
"net/http"
"net/http/httptest"
"testing"
"github.com/labstack/echo"
"github.com/stretchr/testify/assert"
"github.com/thecodingmachine/gotenberg/test"
)
func TestMarkdown(t *testing.T) {
body, contentType := test.MarkdownMultipartForm(t)
req := httptest.NewRequest(http.MethodPost, "/convert/markdown", body)
req.Header.Set(echo.HeaderContentType, contentType)
rec := httptest.NewRecorder()
e := echo.New()
c := e.NewContext(req, rec)
assert.NoError(t, convertMarkdown(c))
}