package auth

import (
	"testing"
	"time"
)

func TestNewJWT_DoesNotPanicOnInvalidLegacyConfig(t *testing.T) {
	manager := NewJWT("", 2*time.Hour, 7*24*time.Hour)
	if manager == nil {
		t.Fatal("expected manager instance")
	}

	if _, err := manager.GenerateAccessToken(1, "tester"); err == nil {
		t.Fatal("expected invalid legacy manager to return error")
	}
}
