summaryrefslogtreecommitdiff
path: root/srv/src/http/auth_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'srv/src/http/auth_test.go')
-rw-r--r--srv/src/http/auth_test.go24
1 files changed, 0 insertions, 24 deletions
diff --git a/srv/src/http/auth_test.go b/srv/src/http/auth_test.go
deleted file mode 100644
index 9e2d440..0000000
--- a/srv/src/http/auth_test.go
+++ /dev/null
@@ -1,24 +0,0 @@
-package http
-
-import (
- "context"
- "testing"
- "time"
-
- "github.com/stretchr/testify/assert"
-)
-
-func TestAuther(t *testing.T) {
-
- ctx := context.Background()
- password := "foo"
- hashedPassword := NewPasswordHash(password)
-
- auther := NewAuther(map[string]string{
- "FOO": hashedPassword,
- }, 1*time.Millisecond)
-
- assert.False(t, auther.Allowed(ctx, "BAR", password))
- assert.False(t, auther.Allowed(ctx, "FOO", "bar"))
- assert.True(t, auther.Allowed(ctx, "FOO", password))
-}