15 lines
382 B
Go
15 lines
382 B
Go
package auth
|
|
|
|
import "testing"
|
|
|
|
func TestXAIAuthenticatorProviderAndRefreshLead(t *testing.T) {
|
|
authenticator := NewXAIAuthenticator()
|
|
if authenticator.Provider() != "xai" {
|
|
t.Fatalf("Provider() = %q, want xai", authenticator.Provider())
|
|
}
|
|
lead := authenticator.RefreshLead()
|
|
if lead == nil || *lead <= 0 {
|
|
t.Fatalf("RefreshLead() = %v, want positive duration", lead)
|
|
}
|
|
}
|