MCPcopy
hub / github.com/github/spec-kit / test_execute_no_default_no_match

Method test_execute_no_default_no_match

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

Source from the content-addressed store, hash-verified

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
1768 from specify_cli.workflows.base import StepContext
1769
1770 step = SwitchStep()
1771 ctx = StepContext(
1772 steps={"review": {"output": {"choice": "other"}}}
1773 )
1774 config = {
1775 "id": "route",
1776 "expression": "{{ steps.review.output.choice }}",
1777 "cases": {
1778 "approve": [{"id": "plan", "command": "speckit.plan"}],
1779 },
1780 }
1781 result = step.execute(config, ctx)
1782 assert result.output["matched_case"] == "__default__"
1783 assert result.next_steps == []
1784
1785 def test_validate_missing_expression(self):
1786 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