You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1.3 KiB

+++ title = "Test suite: tag operations — create with tags, list by tag filter, update replaces all tags" priority = 5 status = "done" ticket_type = "task" dependencies = ["9b581f", "175382"] +++

Integration tests live in `tests/` and exercise the API binary against a temporary SQLite database. They run with `cargo test` and must not require a running Cloudflare environment. The test harness spawns the API server on a random port and returns the base URL. Write the tag operations test suite in `tests/test_tags.rs` (or similar). Test cases: 1. Create quote with tags — verify tags appear in the response 2. List quotes filtered by tag — `?tag=motivation` returns only tagged quotes 3. Update quote replaces all tags — old tags gone, new tags present 4. Delete quote cascades — no orphaned rows in `quote_tags` - Use the shared test harness from ticket 9b581f. - Seed quotes with distinct tag sets to avoid test interference. Use `superpowers:verification-before-completion` before closing. Run in order from the `quotesdb/` directory:
cargo fmt
cargo check
cargo clippy
cargo test
`test(quotesdb): add tag operations test suite`