diff options
Diffstat (limited to 'internal/handlers/handlers_test.go')
| -rw-r--r-- | internal/handlers/handlers_test.go | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/internal/handlers/handlers_test.go b/internal/handlers/handlers_test.go index 61fb75d..7630e5d 100644 --- a/internal/handlers/handlers_test.go +++ b/internal/handlers/handlers_test.go @@ -480,11 +480,13 @@ func TestHandleShoppingModeComplete(t *testing.T) { } }) + // PlanToEat is the only remaining external source; Trello was removed as a + // shopping source, so completing one of its items is no longer meaningful. t.Run("complete external item marks it checked", func(t *testing.T) { req := httptest.NewRequest("POST", "/shopping/mode/TestStore/complete", nil) req.Form = map[string][]string{ - "id": {"trello-123"}, - "source": {"trello"}, + "id": {"pte-123"}, + "source": {"plantoeat"}, } rctx := chi.NewRouteContext() @@ -499,9 +501,9 @@ func TestHandleShoppingModeComplete(t *testing.T) { } // Verify item is marked as checked - checks, _ := db.GetShoppingItemChecks("trello") - if !checks["trello-123"] { - t.Error("Expected trello item to be marked as checked") + checks, _ := db.GetShoppingItemChecks("plantoeat") + if !checks["pte-123"] { + t.Error("Expected plantoeat item to be marked as checked") } }) } @@ -787,7 +789,8 @@ func TestShoppingComplete_ExternalItemMarkedChecked(t *testing.T) { source string itemID string }{ - {"trello", "trello-card-123"}, + // Trello is no longer a shopping source; plantoeat is the only + // external one whose items can be checked off. {"plantoeat", "pte-item-456"}, } |
