added empty token check and copyright
This commit is contained in:
parent
40e1f1bf58
commit
339d6de8bd
4 changed files with 15 additions and 1 deletions
|
|
@ -1,3 +1,5 @@
|
|||
// Copyright (C) 2018 Marius Schellenberger
|
||||
|
||||
package jwt
|
||||
|
||||
import (
|
||||
|
|
@ -18,6 +20,10 @@ func TestValidate(t *testing.T) {
|
|||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
_, err = DecodeToken("")
|
||||
if err == nil {
|
||||
t.Error(errors.New("token is empty"))
|
||||
}
|
||||
nt, err := DecodeToken(token.String())
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue