diff --git a/processing_options_test.go b/processing_options_test.go index b265f24f..9af24a38 100644 --- a/processing_options_test.go +++ b/processing_options_test.go @@ -52,15 +52,6 @@ func (s *ProcessingOptionsTestSuite) TestParseBase64URLWithBase() { assert.Equal(s.T(), imageTypePNG, getProcessingOptions(ctx).Format) } -func (s *ProcessingOptionsTestSuite) TestParseBase64URLInvalid() { - imageURL := "lorem/ipsum.jpg?param=value" - req := s.getRequest(fmt.Sprintf("http://example.com/unsafe/size:100:100/%s.png", base64.RawURLEncoding.EncodeToString([]byte(imageURL)))) - _, err := parsePath(context.Background(), req) - - require.Error(s.T(), err) - assert.Contains(s.T(), err.Error(), "Invalid image url") -} - func (s *ProcessingOptionsTestSuite) TestParsePlainURL() { imageURL := "http://images.dev/lorem/ipsum.jpg" req := s.getRequest(fmt.Sprintf("http://example.com/unsafe/size:100:100/plain/%s@png", imageURL)) @@ -115,24 +106,6 @@ func (s *ProcessingOptionsTestSuite) TestParsePlainURLEscapedWithBase() { assert.Equal(s.T(), imageTypePNG, getProcessingOptions(ctx).Format) } -func (s *ProcessingOptionsTestSuite) TestParsePlainURLInvalid() { - imageURL := "lorem/ipsum.jpg?param=value" - req := s.getRequest(fmt.Sprintf("http://example.com/unsafe/size:100:100/plain/%s@png", imageURL)) - _, err := parsePath(context.Background(), req) - - require.Error(s.T(), err) - assert.Contains(s.T(), err.Error(), "Invalid image url") -} - -func (s *ProcessingOptionsTestSuite) TestParsePlainURLEscapedInvalid() { - imageURL := "lorem/ipsum.jpg?param=value" - req := s.getRequest(fmt.Sprintf("http://example.com/unsafe/size:100:100/plain/%s@png", url.PathEscape(imageURL))) - _, err := parsePath(context.Background(), req) - - require.Error(s.T(), err) - assert.Contains(s.T(), err.Error(), "Invalid image url") -} - func (s *ProcessingOptionsTestSuite) TestParsePathBasic() { req := s.getRequest("http://example.com/unsafe/fill/100/200/noea/1/plain/http://images.dev/lorem/ipsum.jpg@png") ctx, err := parsePath(context.Background(), req)