mirror of
https://github.com/sstent/go-garminconnect.git
synced 2026-01-26 00:52:43 +00:00
garth more done - stuck on tests
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user