diff options
author | Wolfy-J <[email protected]> | 2018-06-10 15:28:02 +0300 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2018-06-10 15:28:02 +0300 |
commit | a62237fa5afc310453e709837e363f0bb4d7ecf3 (patch) | |
tree | 9e89d28e40ef5e39df7975a8d598619d732896ce /http/fs_config_test.go | |
parent | ee2e495a76c1cb0666f6f210ed0e59f94314b9e5 (diff) |
fs config
Diffstat (limited to 'http/fs_config_test.go')
-rw-r--r-- | http/fs_config_test.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/http/fs_config_test.go b/http/fs_config_test.go new file mode 100644 index 00000000..05f568e5 --- /dev/null +++ b/http/fs_config_test.go @@ -0,0 +1,15 @@ +package http + +import ( + "testing" + "github.com/stretchr/testify/assert" +) + +func TestFsConfig_Forbids(t *testing.T) { + cfg := FsConfig{Forbid: []string{".php"}} + + assert.True(t, cfg.Forbids("index.php")) + assert.True(t, cfg.Forbids("index.PHP")) + assert.True(t, cfg.Forbids("phpadmin/index.bak.php")) + assert.False(t, cfg.Forbids("index.html")) +} |