MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / TestSanitize

Method TestSanitize

processing/svg/svg_test.go:48–59  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

46}
47
48func (s *SvgTestSuite) TestSanitize() {
49 origin := s.readTestFile("test1.svg")
50 expected := s.readTestFile("test1.sanitized.svg")
51
52 config := svg.NewDefaultConfig()
53 svgProc := svg.New(&config)
54
55 actual, err := svgProc.Process(options.New(), origin)
56 s.Require().NoError(err)
57
58 s.compare(expected, actual)
59}
60
61func TestSvg(t *testing.T) {
62 suite.Run(t, new(SvgTestSuite))

Callers

nothing calls this directly

Calls 6

readTestFileMethod · 0.95
compareMethod · 0.95
NewDefaultConfigFunction · 0.92
NewFunction · 0.92
NewFunction · 0.92
ProcessMethod · 0.80

Tested by

no test coverage detected