mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-23 22:27:38 -05:00
Update
Update with missing assertion for the Next middleware being properly set , this makes sure that Ext middleware carries the requests to the further middlewares .
This commit is contained in:
parent
d7db1b9576
commit
076fc4d72c
1 changed files with 5 additions and 1 deletions
|
@ -25,7 +25,7 @@ func TestExt(t *testing.T) {
|
||||||
if !ok {
|
if !ok {
|
||||||
t.Fatalf("Expected handler to be type Ext, got: %#v", handler)
|
t.Fatalf("Expected handler to be type Ext, got: %#v", handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
if myHandler.Extensions[0] != ".html" {
|
if myHandler.Extensions[0] != ".html" {
|
||||||
t.Errorf("Expected .html in the list of Extensions")
|
t.Errorf("Expected .html in the list of Extensions")
|
||||||
}
|
}
|
||||||
|
@ -35,5 +35,9 @@ func TestExt(t *testing.T) {
|
||||||
if myHandler.Extensions[2] != ".php" {
|
if myHandler.Extensions[2] != ".php" {
|
||||||
t.Errorf("Expected .php in the list of Extensions")
|
t.Errorf("Expected .php in the list of Extensions")
|
||||||
}
|
}
|
||||||
|
if !sameNext(myHandler.Next, emptyNext) {
|
||||||
|
t.Error("'Next' field of handler was not set properly")
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue