test(07-01): add failing tests for JWT lifecycle primitives

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Jakub Zych
2026-09-22 13:33:37 +02:00
parent 80eaeb87ea
commit 251f3cc4a0
5 changed files with 364 additions and 1 deletions

View File

@@ -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 {