checkvist-api is a type-safe, idiomatic Go client library for the Checkvist (https://checkvist.com/) API.
Find a file
Oliver Jakoubek 15cf18e2d8 Add unit tests for Client and Auth
Create client_test.go with comprehensive tests using httptest.Server:
- TestNewClient_Defaults: verify default configuration
- TestNewClient_WithOptions: test functional options
- TestAuthenticate_Success: successful authentication flow
- TestAuthenticate_InvalidCredentials: 401 error handling
- TestAuthenticate_2FA: 2FA token support
- TestTokenRefresh_Auto: automatic token refresh on expiry
- TestTokenRefresh_Manual: manual token refresh
- TestCurrentUser: get current user information
- TestRetryLogic_429: retry on rate limiting
- TestRetryLogic_5xx: retry on server errors
- TestRetryLogic_ExhaustedRetries: max retries exceeded
- TestRetryLogic_ContextCancellation: respect context cancellation
- TestCalculateRetryDelay: exponential backoff calculation
- TestDefaultRetryConfig: verify default retry settings

Add testdata/auth/ fixtures:
- login_success.json
- current_user.json

All 14 tests pass.

Closes checkvist-api-8bn
2026-01-14 13:35:44 +01:00
.beads Add unit tests for Client and Auth 2026-01-14 13:35:44 +01:00
magefiles Set up Mage build targets 2026-01-14 13:33:14 +01:00
testdata Add unit tests for Client and Auth 2026-01-14 13:35:44 +01:00
.gitattributes Initial commit 2026-01-14 12:42:00 +01:00
.gitignore Initial commit 2026-01-14 12:42:00 +01:00
AGENTS.md Initial commit 2026-01-14 12:42:00 +01:00
checklists.go Initial commit 2026-01-14 12:42:00 +01:00
client.go Implement HTTP request helper with retry logic 2026-01-14 13:28:03 +01:00
client_test.go Add unit tests for Client and Auth 2026-01-14 13:35:44 +01:00
errors.go Implement error types and sentinel errors 2026-01-14 13:23:48 +01:00
filter.go Initial commit 2026-01-14 12:42:00 +01:00
go.mod Initial commit 2026-01-14 12:42:00 +01:00
LICENSE Initial commit 2026-01-14 12:42:00 +01:00
models.go Implement data models for Checkvist API entities 2026-01-14 13:22:29 +01:00
notes.go Initial commit 2026-01-14 12:42:00 +01:00
options.go Implement Client struct with functional options 2026-01-14 13:25:03 +01:00
tasks.go Initial commit 2026-01-14 12:42:00 +01:00