Test auth function

This commit is contained in:
Matthew Dillon 2015-04-18 10:22:04 -08:00
parent 752c683a99
commit 1dec4498b0

View file

@ -34,7 +34,13 @@ func TestNewJWTMiddleware(t *testing.T) {
if middleware.secret != "password" { if middleware.secret != "password" {
t.Errorf("expected 'password', got %v", middleware.secret) 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) { func TestNewJWTMiddlewareNoConfig(t *testing.T) {