mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-08-17 12:42:16 +01:00
feat: remove deprecated stuff (#726)
This commit is contained in:
@@ -28,25 +28,6 @@ func TestFormDataChromiumPdfOptions(t *testing.T) {
|
||||
ctx: &api.ContextMock{Context: new(api.Context)},
|
||||
expectedOptions: DefaultOptions(),
|
||||
},
|
||||
{
|
||||
scenario: "deprecated userAgent form field",
|
||||
ctx: func() *api.ContextMock {
|
||||
ctx := &api.ContextMock{Context: new(api.Context)}
|
||||
ctx.SetValues(map[string][]string{
|
||||
"userAgent": {
|
||||
"foo",
|
||||
},
|
||||
})
|
||||
return ctx
|
||||
}(),
|
||||
expectedOptions: func() Options {
|
||||
options := DefaultOptions()
|
||||
options.ExtraHttpHeaders = map[string]string{
|
||||
"User-Agent": "foo",
|
||||
}
|
||||
return options
|
||||
}(),
|
||||
},
|
||||
{
|
||||
scenario: "invalid extraHttpHeaders form field",
|
||||
ctx: func() *api.ContextMock {
|
||||
@@ -132,19 +113,6 @@ func TestFormDataChromiumPdfFormats(t *testing.T) {
|
||||
ctx: &api.ContextMock{Context: new(api.Context)},
|
||||
expectedPdfFormats: gotenberg.PdfFormats{},
|
||||
},
|
||||
{
|
||||
scenario: "deprecated pdfFormat form field",
|
||||
ctx: func() *api.ContextMock {
|
||||
ctx := &api.ContextMock{Context: new(api.Context)}
|
||||
ctx.SetValues(map[string][]string{
|
||||
"pdfFormat": {
|
||||
"foo",
|
||||
},
|
||||
})
|
||||
return ctx
|
||||
}(),
|
||||
expectedPdfFormats: gotenberg.PdfFormats{PdfA: "foo"},
|
||||
},
|
||||
{
|
||||
scenario: "pdfa and pdfua form fields",
|
||||
ctx: func() *api.ContextMock {
|
||||
@@ -726,7 +694,7 @@ func TestConvertUrl(t *testing.T) {
|
||||
expectOutputPathsCount: 0,
|
||||
},
|
||||
{
|
||||
scenario: "success with pdfFormat form field",
|
||||
scenario: "success with pdfa form field",
|
||||
ctx: &api.ContextMock{Context: new(api.Context)},
|
||||
api: &ApiMock{func(ctx context.Context, logger *zap.Logger, url, outputPath string, options Options) error {
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user