garth more done

This commit is contained in:
2025-08-29 07:08:35 -07:00
parent fd0924e85e
commit 6b17d41a7a
13 changed files with 340 additions and 443 deletions

View File

@@ -408,13 +408,6 @@ func (m *MockServer) handleGear(w http.ResponseWriter, r *http.Request) {
})
}
// MockAuthenticator implements garth.Authenticator for testing
type MockAuthenticator struct{}
func (m *MockAuthenticator) RefreshToken(_, _ string) (string, error) {
return "refreshed-token", nil
}
// NewClientWithBaseURL creates a test client that uses the mock server's URL
func NewClientWithBaseURL(baseURL string) *Client {
session := &garth.Session{
@@ -423,7 +416,7 @@ func NewClientWithBaseURL(baseURL string) *Client {
}
// Create mock authenticator for tests
auth := &MockAuthenticator{}
auth := NewMockAuthenticator()
client, err := NewClient(auth, session, "")
if err != nil {