mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-08-08 00:22:14 +01:00
22 lines
503 B
Go
22 lines
503 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 TestOffice(t *testing.T) {
|
|
body, contentType := test.OfficeMultipartForm(t)
|
|
req := httptest.NewRequest(http.MethodPost, "/convert/office", body)
|
|
req.Header.Set(echo.HeaderContentType, contentType)
|
|
rec := httptest.NewRecorder()
|
|
e := echo.New()
|
|
c := e.NewContext(req, rec)
|
|
assert.NoError(t, convertOffice(c))
|
|
}
|