test(07-01): add failing tests for JWT lifecycle primitives
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,6 +1,17 @@
|
||||
package bouncer
|
||||
|
||||
import "testing"
|
||||
import (
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
func TestPrincipalLocaleAndCutoff(t *testing.T) {
|
||||
when := time.Unix(1_700_000_000, 0)
|
||||
p := Principal{PreferredLocale: "pl", TokensValidAfter: when}
|
||||
if p.PreferredLocale != "pl" || !p.TokensValidAfter.Equal(when) {
|
||||
t.Fatalf("%+v", p)
|
||||
}
|
||||
}
|
||||
|
||||
func TestContextCredentialRoundTrip(t *testing.T) {
|
||||
if _, ok := Credential(t.Context()); ok {
|
||||
|
||||
Reference in New Issue
Block a user