This commit is contained in:
Oliver Jakoubek 2026-01-14 21:24:46 +01:00
commit 773da6323d
3 changed files with 15 additions and 15 deletions

View file

@ -458,11 +458,11 @@ func TestCalculateRetryDelay(t *testing.T) {
attempt int attempt int
expected time.Duration expected time.Duration
}{ }{
{1, 200 * time.Millisecond}, // 100ms * 2^1 {1, 200 * time.Millisecond}, // 100ms * 2^1
{2, 400 * time.Millisecond}, // 100ms * 2^2 {2, 400 * time.Millisecond}, // 100ms * 2^2
{3, 800 * time.Millisecond}, // 100ms * 2^3 {3, 800 * time.Millisecond}, // 100ms * 2^3
{4, 1 * time.Second}, // capped at MaxDelay {4, 1 * time.Second}, // capped at MaxDelay
{5, 1 * time.Second}, // capped at MaxDelay {5, 1 * time.Second}, // capped at MaxDelay
} }
for _, tc := range tests { for _, tc := range tests {

View file

@ -54,13 +54,13 @@ func (s *TaskService) Get(ctx context.Context, taskID int) (*Task, error) {
// CreateTaskRequest represents the request body for creating a task. // CreateTaskRequest represents the request body for creating a task.
type CreateTaskRequest struct { type CreateTaskRequest struct {
Content string `json:"content"` Content string `json:"content"`
ParentID int `json:"parent_id,omitempty"` ParentID int `json:"parent_id,omitempty"`
Position int `json:"position,omitempty"` Position int `json:"position,omitempty"`
Due string `json:"due_date,omitempty"` Due string `json:"due_date,omitempty"`
Priority int `json:"priority,omitempty"` Priority int `json:"priority,omitempty"`
Tags string `json:"tags,omitempty"` Tags string `json:"tags,omitempty"`
Repeat string `json:"repeat,omitempty"` Repeat string `json:"repeat,omitempty"`
} }
// createTaskWrapper wraps the task fields for the nested JSON format // createTaskWrapper wraps the task fields for the nested JSON format

View file

@ -480,9 +480,9 @@ func TestTasks_Create_RealAPIFormat(t *testing.T) {
ChecklistID: 1, ChecklistID: 1,
Content: content, Content: content,
Status: StatusOpen, Status: StatusOpen,
Priority: 0, // Priority NOT set (ignored) Priority: 0, // Priority NOT set (ignored)
DueDateRaw: "", // Due date NOT set (ignored) DueDateRaw: "", // Due date NOT set (ignored)
TagsAsText: "", // Tags NOT set (ignored) TagsAsText: "", // Tags NOT set (ignored)
CreatedAt: NewAPITime(time.Now()), CreatedAt: NewAPITime(time.Now()),
UpdatedAt: NewAPITime(time.Now()), UpdatedAt: NewAPITime(time.Now()),
} }