garth more done - stuck on tests

This commit is contained in:
2025-08-29 05:29:19 -07:00
parent 237e17fbb3
commit fd0924e85e
10 changed files with 90 additions and 29 deletions

View File

@@ -88,8 +88,14 @@ func TestGetBodyComposition(t *testing.T) {
ExpiresAt: time.Now().Add(8 * time.Hour), // Not expired
}
// Setup client with test server
client, err := NewClient(session, "")
// Create mock authenticator for tests
mockAuth := &struct {
RefreshToken func(_, _ string) (string, error)
}{}
mockAuth.RefreshToken = func(_, _ string) (string, error) {
return "refreshed-token", nil
}
client, err := NewClient(mockAuth, session, "")
assert.NoError(t, err)
client.HTTPClient.SetBaseURL(server.URL)