1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-17 09:57:01 +00:00
Former-commit-id: 2c2c32afe31fe94543d145ab8c8475d7b4392ff1
This commit is contained in:
Gerasimos (Makis) Maropoulos
2018-11-09 03:03:48 +02:00
parent 75ead88483
commit e08d0b4be6
19 changed files with 158 additions and 33 deletions

View File

@@ -142,6 +142,7 @@ func TestConfigurationYAML(t *testing.T) {
yamlConfigurationContents := `
DisablePathCorrection: false
DisablePathCorrectionRedirection: true
EnablePathEscape: false
FireMethodNotAllowed: true
EnableOptimizations: true
@@ -167,6 +168,10 @@ Other:
t.Fatalf("error on TestConfigurationYAML: Expected DisablePathCorrection %v but got %v", expected, c.DisablePathCorrection)
}
if expected := true; c.DisablePathCorrectionRedirection != expected {
t.Fatalf("error on TestConfigurationYAML: Expected DisablePathCorrectionRedirection %v but got %v", expected, c.DisablePathCorrectionRedirection)
}
if expected := false; c.EnablePathEscape != expected {
t.Fatalf("error on TestConfigurationYAML: Expected EnablePathEscape %v but got %v", expected, c.EnablePathEscape)
}
@@ -235,6 +240,7 @@ func TestConfigurationTOML(t *testing.T) {
}()
tomlConfigurationContents := `
DisablePathCorrectionRedirection = true
EnablePathEscape = false
FireMethodNotAllowed = true
EnableOptimizations = true
@@ -262,6 +268,10 @@ Charset = "UTF-8"
t.Fatalf("error on TestConfigurationTOML: Expected DisablePathCorrection %v but got %v", expected, c.DisablePathCorrection)
}
if expected := true; c.DisablePathCorrectionRedirection != expected {
t.Fatalf("error on TestConfigurationTOML: Expected DisablePathCorrectionRedirection %v but got %v", expected, c.DisablePathCorrectionRedirection)
}
if expected := false; c.EnablePathEscape != expected {
t.Fatalf("error on TestConfigurationTOML: Expected EnablePathEscape %v but got %v", expected, c.EnablePathEscape)
}