TestTaskProgressInfoTimeUpdate tests that timestamps are updated correctly
(t *testing.T)
| 654 | |
| 655 | // TestTaskProgressInfoTimeUpdate tests that timestamps are updated correctly |
| 656 | func TestTaskProgressInfoTimeUpdate(t *testing.T) { |
| 657 | info := RegisterTask("time-test", "directlinks", "local", "downloads", "Test", "") |
| 658 | defer DeleteTask("time-test") |
| 659 | |
| 660 | originalTime := info.UpdatedAt |
| 661 | time.Sleep(10 * time.Millisecond) // Ensure time difference |
| 662 | |
| 663 | info.UpdateStatus(TaskStatusRunning) |
| 664 | if !info.UpdatedAt.After(originalTime) { |
| 665 | t.Error("expected UpdatedAt to be updated") |
| 666 | } |
| 667 | } |
| 668 | |
| 669 | // TestWebhookPayloadWithNilCompletedAt tests webhook payload with nil completed_at |
| 670 | func TestWebhookPayloadWithNilCompletedAt(t *testing.T) { |
nothing calls this directly
no test coverage detected