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

@@ -14,13 +14,6 @@ import (
"github.com/stretchr/testify/assert"
)
// mockAuthImpl implements the Authenticator interface for tests
type mockAuthImpl struct{}
func (m *mockAuthImpl) RefreshToken(_, _ string) (string, error) {
return "refreshed-token", nil
}
func TestGearService(t *testing.T) {
// Create test server
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
@@ -83,7 +76,7 @@ func TestGearService(t *testing.T) {
// Create client
// Create mock authenticator for tests
mockAuth := &mockAuthImpl{}
mockAuth := NewMockAuthenticator()
client, err := NewClient(mockAuth, session, "")
assert.NoError(t, err)
client.HTTPClient.SetBaseURL(srv.URL)
@@ -103,7 +96,7 @@ func TestGearService(t *testing.T) {
// Create client
// Create mock authenticator for tests
mockAuth := &mockAuthImpl{}
mockAuth := NewMockAuthenticator()
client, err := NewClient(mockAuth, session, "")
assert.NoError(t, err)
client.HTTPClient.SetBaseURL(srv.URL)
@@ -123,7 +116,7 @@ func TestGearService(t *testing.T) {
// Create client
// Create mock authenticator for tests
mockAuth := &mockAuthImpl{}
mockAuth := NewMockAuthenticator()
client, err := NewClient(mockAuth, session, "")
assert.NoError(t, err)
client.HTTPClient.SetBaseURL(srv.URL)