浏览代码

Fix tests

DarthSim 6 年之前
父节点
当前提交
9aa5e20b3f
共有 1 个文件被更改,包括 5 次插入2 次删除
  1. 5 2
      processing_options_test.go

+ 5 - 2
processing_options_test.go

@@ -389,9 +389,12 @@ func (s *ProcessingOptionsTestSuite) TestParsePathAdvancedPresetLoopDetection()
 	}
 
 	req := s.getRequest("http://example.com/unsafe/preset:test1:test2:test1/plain/http://images.dev/lorem/ipsum.jpg")
-	_, err := parsePath(context.Background(), req)
+	ctx, err := parsePath(context.Background(), req)
 
-	require.Error(s.T(), err)
+	require.Nil(s.T(), err)
+
+	po := getProcessingOptions(ctx)
+	require.ElementsMatch(s.T(), po.UsedPresets, []string{"test1", "test2"})
 }
 
 func (s *ProcessingOptionsTestSuite) TestParsePathAdvancedCachebuster() {