mirror of
https://github.com/router-for-me/CLIProxyAPIPlus.git
synced 2026-04-15 10:52:03 +00:00
20 lines
392 B
Go
20 lines
392 B
Go
package auth
|
|
|
|
import (
|
|
"testing"
|
|
"time"
|
|
)
|
|
|
|
func TestQwenAuthenticator_RefreshLeadIsSane(t *testing.T) {
|
|
lead := NewQwenAuthenticator().RefreshLead()
|
|
if lead == nil {
|
|
t.Fatal("RefreshLead() = nil, want non-nil")
|
|
}
|
|
if *lead <= 0 {
|
|
t.Fatalf("RefreshLead() = %s, want > 0", *lead)
|
|
}
|
|
if *lead > 30*time.Minute {
|
|
t.Fatalf("RefreshLead() = %s, want <= %s", *lead, 30*time.Minute)
|
|
}
|
|
}
|