MCPcopy Create free account
hub / github.com/basecamp/hey-cli / TestNormalizeBaseURL

Function TestNormalizeBaseURL

internal/auth/auth_test.go:69–86  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

67}
68
69func TestNormalizeBaseURL(t *testing.T) {
70 tests := []struct {
71 input string
72 want string
73 }{
74 {"https://app.hey.com/", "https://app.hey.com"},
75 {"https://app.hey.com///", "https://app.hey.com"},
76 {"https://app.hey.com", "https://app.hey.com"},
77 }
78 for _, tt := range tests {
79 t.Run(tt.input, func(t *testing.T) {
80 got := normalizeBaseURL(tt.input)
81 if got != tt.want {
82 t.Errorf("normalizeBaseURL(%q) = %q, want %q", tt.input, got, tt.want)
83 }
84 })
85 }
86}
87
88func TestTokenRefreshOnExpiry(t *testing.T) {
89 refreshCalls := 0

Callers

nothing calls this directly

Calls 1

normalizeBaseURLFunction · 0.85

Tested by

no test coverage detected