1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-17 09:57:01 +00:00

add 'Configuration.PathIntelligence' and 'OnErrorCode' and 'OnAnyErrorCode' on APIContainer

Former-commit-id: bc3d0232106622063205f326bfa4ed3aa84179de
This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-05-17 08:10:07 +03:00
parent 21a013569f
commit 1e20996330
10 changed files with 104 additions and 27 deletions

View File

@@ -146,6 +146,7 @@ func TestConfigurationYAML(t *testing.T) {
yamlConfigurationContents := `
DisablePathCorrection: false
DisablePathCorrectionRedirection: true
EnablePathIntelligence: true
EnablePathEscape: false
FireMethodNotAllowed: true
EnableOptimizations: true
@@ -175,6 +176,10 @@ Other:
t.Fatalf("error on TestConfigurationYAML: Expected DisablePathCorrectionRedirection %v but got %v", expected, c.DisablePathCorrectionRedirection)
}
if expected := true; c.EnablePathIntelligence != expected {
t.Fatalf("error on TestConfigurationYAML: Expected EnablePathIntelligence %v but got %v", expected, c.EnablePathIntelligence)
}
if expected := false; c.EnablePathEscape != expected {
t.Fatalf("error on TestConfigurationYAML: Expected EnablePathEscape %v but got %v", expected, c.EnablePathEscape)
}