(t *testing.T)
| 96 | } |
| 97 | |
| 98 | func TestAuthManager_IsTokenAuth(t *testing.T) { |
| 99 | httpClient := &HTTPClient{baseURL: "https://test.example.com"} |
| 100 | logger := testutils.NewTestLogger() |
| 101 | |
| 102 | // Test password auth |
| 103 | passwordAuth := NewAuthManagerWithPassword(httpClient, "user", "pass", logger) |
| 104 | assert.False(t, passwordAuth.IsTokenAuth()) |
| 105 | |
| 106 | // Test token auth |
| 107 | tokenAuth := NewAuthManagerWithToken(httpClient, "token", logger) |
| 108 | assert.True(t, tokenAuth.IsTokenAuth()) |
| 109 | } |
| 110 | |
| 111 | func TestAuthManager_EnsureAuthenticated_WithToken(t *testing.T) { |
| 112 | // Create a mock HTTP client |
nothing calls this directly
no test coverage detected