(t *testing.T)
| 80 | } |
| 81 | |
| 82 | func TestNewAuthManagerWithToken(t *testing.T) { |
| 83 | httpClient := &HTTPClient{baseURL: "https://test.example.com"} |
| 84 | logger := testutils.NewTestLogger() |
| 85 | token := testTokenValue |
| 86 | |
| 87 | authManager := NewAuthManagerWithToken(httpClient, token, logger) |
| 88 | |
| 89 | assert.NotNil(t, authManager) |
| 90 | assert.Equal(t, httpClient, authManager.httpClient) |
| 91 | assert.Equal(t, token, authManager.token) |
| 92 | assert.Empty(t, authManager.username) |
| 93 | assert.Empty(t, authManager.password) |
| 94 | assert.Equal(t, logger, authManager.logger) |
| 95 | assert.True(t, authManager.IsTokenAuth()) |
| 96 | } |
| 97 | |
| 98 | func TestAuthManager_IsTokenAuth(t *testing.T) { |
| 99 | httpClient := &HTTPClient{baseURL: "https://test.example.com"} |
nothing calls this directly
no test coverage detected