Fix dynamic variable name

This commit is contained in:
Manuel de Brito Fontes 2017-06-01 23:30:22 -04:00
parent 32f24380ec
commit b70e9ca078
3 changed files with 33 additions and 2 deletions

View file

@ -198,3 +198,11 @@ func BenchmarkTemplateWithData(b *testing.B) {
ngxTpl.Write(dat)
}
}
func TestBuildDenyVariable(t *testing.T) {
a := buildDenyVariable("host1.example.com_/.well-known/acme-challenge")
b := buildDenyVariable("host1.example.com_/.well-known/acme-challenge")
if !reflect.DeepEqual(a, b) {
t.Errorf("Expected '%v' but returned '%v'", a, b)
}
}