Test auth function
This commit is contained in:
parent
752c683a99
commit
1dec4498b0
1 changed files with 7 additions and 1 deletions
|
@ -34,7 +34,13 @@ func TestNewJWTMiddleware(t *testing.T) {
|
|||
if middleware.secret != "password" {
|
||||
t.Errorf("expected 'password', got %v", middleware.secret)
|
||||
}
|
||||
// TODO: test auth func init
|
||||
val, err := middleware.auth("", "")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if val != true {
|
||||
t.Errorf("expected true, %v", val)
|
||||
}
|
||||
}
|
||||
|
||||
func TestNewJWTMiddlewareNoConfig(t *testing.T) {
|
||||
|
|
Loading…
Add table
Reference in a new issue