summaryrefslogtreecommitdiff
path: root/internal/store/sqlite_test.go
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-01-23 21:42:51 -1000
committerPeter Stone <thepeterstone@gmail.com>2026-01-23 21:42:51 -1000
commitb69d2d5fc8779f43b1ac789605318488efc91361 (patch)
tree52d457555ac5ca9382958c80b8174ca1d46b1e9a /internal/store/sqlite_test.go
parent465093343ddd398ce5f6377fc9c472d8251c618b (diff)
Fix uncomplete: add HX-Reswap header to prevent empty swap
The uncomplete response was returning an empty body, causing HTMX to swap the element with nothing before the refresh-tasks trigger fired. Added HX-Reswap: none header to preserve the element while the refresh event propagates. Also fixed TestGetCardsByDateRange test data to include all required columns (list_id, list_name, url). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Diffstat (limited to 'internal/store/sqlite_test.go')
-rw-r--r--internal/store/sqlite_test.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/internal/store/sqlite_test.go b/internal/store/sqlite_test.go
index 7027cbe..5719e24 100644
--- a/internal/store/sqlite_test.go
+++ b/internal/store/sqlite_test.go
@@ -543,13 +543,13 @@ func TestGetCardsByDateRange(t *testing.T) {
// Create cards
_, err = store.db.Exec(`
- INSERT INTO cards (id, name, board_id, due_date)
- VALUES
- (?, ?, ?, ?),
- (?, ?, ?, ?)
- `,
- "card1", "Card 1", "board1", now,
- "card2", "Card 2", "board1", tomorrow)
+ INSERT INTO cards (id, name, board_id, list_id, list_name, due_date, url)
+ VALUES
+ (?, ?, ?, ?, ?, ?, ?),
+ (?, ?, ?, ?, ?, ?, ?)
+ `,
+ "card1", "Card 1", "board1", "list1", "To Do", now, "https://trello.com/c/card1",
+ "card2", "Card 2", "board1", "list1", "To Do", tomorrow, "https://trello.com/c/card2")
if err != nil {
t.Fatalf("Failed to insert cards: %v", err)
}