MCPcopy Index your code
hub / github.com/github/spec-kit / test_execute_falls_to_default

Method test_execute_falls_to_default

tests/test_workflows.py:1746–1764  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1744 assert result.next_steps[0]["id"] == "plan"
1745
1746 def test_execute_falls_to_default(self):
1747 from specify_cli.workflows.steps.switch import SwitchStep
1748 from specify_cli.workflows.base import StepContext
1749
1750 step = SwitchStep()
1751 ctx = StepContext(
1752 steps={"review": {"output": {"choice": "unknown"}}}
1753 )
1754 config = {
1755 "id": "route",
1756 "expression": "{{ steps.review.output.choice }}",
1757 "cases": {
1758 "approve": [{"id": "plan", "command": "speckit.plan"}],
1759 },
1760 "default": [{"id": "fallback", "type": "gate", "message": "Fallback"}],
1761 }
1762 result = step.execute(config, ctx)
1763 assert result.output["matched_case"] == "__default__"
1764 assert result.next_steps[0]["id"] == "fallback"
1765
1766 def test_execute_no_default_no_match(self):
1767 from specify_cli.workflows.steps.switch import SwitchStep

Callers

nothing calls this directly

Calls 3

executeMethod · 0.95
SwitchStepClass · 0.90
StepContextClass · 0.90

Tested by

no test coverage detected