huskies: merge 974
This commit is contained in:
@@ -993,4 +993,40 @@ fn move_story_merge_to_current_succeeds() {
|
||||
);
|
||||
}
|
||||
|
||||
// ── Story 974: Done → Coding (hotfix) ─────────────────────────────
|
||||
|
||||
#[test]
|
||||
fn hotfix_requested_from_done_lands_in_coding() {
|
||||
let done = Stage::Done {
|
||||
merged_at: chrono::Utc::now(),
|
||||
merge_commit: sha("abc123"),
|
||||
};
|
||||
let result = transition(done, PipelineEvent::HotfixRequested).unwrap();
|
||||
assert!(
|
||||
matches!(result, Stage::Coding),
|
||||
"Done + HotfixRequested must land in Coding; got: {:?}",
|
||||
result
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn hotfix_requested_rejected_from_non_done_stages() {
|
||||
for stage in [
|
||||
Stage::Backlog,
|
||||
Stage::Coding,
|
||||
Stage::Qa,
|
||||
Stage::Merge {
|
||||
feature_branch: fb("feature/story-1"),
|
||||
commits_ahead: nz(1),
|
||||
},
|
||||
] {
|
||||
let result = transition(stage.clone(), PipelineEvent::HotfixRequested);
|
||||
assert!(
|
||||
result.is_err(),
|
||||
"HotfixRequested must be rejected from {:?}",
|
||||
stage
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// ── ProjectionError Display ─────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user