test: give three no-teeth assertions their teeth

- roles: member invoke asserts the script's actual stdout, not just exit 0;
- api: app-slug script filter asserts the returned script's name;
- workflow_orchestrator: unknown-workflow asserts WorkflowError::NotFound,
  not just is_err().

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
MechaCat02
2026-07-15 20:13:12 +02:00
parent 8e68f3a1cb
commit 80fbf2e642
3 changed files with 19 additions and 3 deletions

View File

@@ -1208,6 +1208,10 @@ async fn list_scripts_filtered_by_app(pool: PgPool) {
.await
.json();
assert_eq!(filtered_by_slug.len(), 1);
// Check the CONTENT, not just the count: a slug that resolved to the WRONG
// app (or was ignored, returning the first script) would also yield one row,
// hiding a cross-app leak. The by-id case above pins its content; this must too.
assert_eq!(filtered_by_slug[0]["name"], "in-other");
}
#[ignore = "needs DATABASE_URL pointing at a running Postgres"]