package imageprocessor import ( "bytes" "errors" "testing" ) // TestImageProcessor_EmptyFormatRefused verifies that a request with no format // is refused, as both image routes give every request a format before it is // processed. func TestImageProcessor_EmptyFormatRefused(t *testing.T) { t.Parallel() _, err := New(Params{}).Process( t.Context(), bytes.NewReader(createTestJPEG(t, 20, 20)), &Request{}, ) if !errors.Is(err, ErrUnsupportedOutputFormat) { t.Errorf("Process() error = %v, want %v", err, ErrUnsupportedOutputFormat) } }