优化结构
This commit is contained in:
@@ -28,3 +28,14 @@ func TestDefaultIgnoredAPIsDoNotHideAnnouncementDataSource(t *testing.T) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestStaticFileAPIsAreIgnoredRegardlessOfConfiguredPrefix(t *testing.T) {
|
||||
for _, method := range []string{"GET", "HEAD"} {
|
||||
if !isStaticFileAPI(apiPO{Method: method, Path: "/files/*filepath"}) {
|
||||
t.Fatalf("%s static route was not recognized", method)
|
||||
}
|
||||
}
|
||||
if isStaticFileAPI(apiPO{Method: "POST", Path: "/files/*filepath"}) {
|
||||
t.Fatal("non-read static route was incorrectly ignored")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user