Test fixtures: every form has the action the lint now requires
Test / test (pull_request) Successful in 21s

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GT37Z1Xtfd9pUuQtMTg6Yt
This commit is contained in:
Bendik Aagaard Lynghaug
2026-10-01 21:46:24 +02:00
co-authored by Claude Fable 5.1
parent 98f93f5ad5
commit 738dbac7fe
+6 -3
View File
@@ -1323,6 +1323,7 @@ alternatives:
public: true
source: {{ kind: kv, bucket: things }}
- name: Object
action: /object
record_as: things
features:
- name: Yours
@@ -1420,6 +1421,7 @@ id: /t
name: Where is it?
alternatives:
- name: A
action: /t
features:
- name: Where
requirements:
@@ -1523,6 +1525,7 @@ id: /b
name: B
alternatives:
- name: A
action: /b
features:
- name: ""
requirements:
@@ -1564,7 +1567,7 @@ alternatives:
fn question_with_requirement(req_yaml: &str) -> std::collections::HashMap<String, Question> {
let question: Question = serde_yaml::from_str(&format!(
"id: /g\nname: G\nalternatives:\n - name: A\n features:\n - name: \"\"\n requirements:\n{req_yaml}\n"
"id: /g\nname: G\nalternatives:\n - name: A\n action: /g\n features:\n - name: \"\"\n requirements:\n{req_yaml}\n"
))
.unwrap();
std::collections::HashMap::from([(question.id.clone(), question)])
@@ -1835,7 +1838,7 @@ alternatives:
fn recorded_buckets_must_be_attended() {
let write_only = vec![(
"index.yaml".to_string(),
"name: Home\nalternatives:\n - name: send\n record_as: black_hole\n".to_string(),
"name: Home\nalternatives:\n - name: send\n action: /\n record_as: black_hole\n".to_string(),
)];
let questions = build_questions(&write_only).unwrap();
let err = validate_questions(&questions, &Default::default()).unwrap_err();
@@ -1846,7 +1849,7 @@ alternatives:
let with_desk = vec![
(
"index.yaml".to_string(),
"name: Home\nalternatives:\n - name: send\n record_as: inbox\n".to_string(),
"name: Home\nalternatives:\n - name: send\n action: /\n record_as: inbox\n".to_string(),
),
(
"review/index.yaml".to_string(),