Skip to content
Snippets Groups Projects
Commit 627ed4c7 authored by Todd Dembrey's avatar Todd Dembrey
Browse files

add tests for the skip action

parent 4bf6d863
No related branches found
No related tags found
No related merge requests found
......@@ -119,3 +119,11 @@ class TestCustomActions(SimpleTestCase):
action = NextPhaseAction('the next!')
stage = StageFactory.build(num_phases=2, phases__actions=[action])
self.assertEqual(stage.phases[0].process(action.name), stage.phases[1])
def test_change_phase_will_skip_phase(self):
target_phase = PhaseFactory()
action = ChangePhaseAction(target_phase.name, 'skip!')
other_phases = PhaseFactory.create_batch(2, actions=[action])
stage = StageFactory.build(phases=[*other_phases, target_phase])
self.assertEqual(stage.phases[0].process(action.name), stage.phases[2])
self.assertEqual(stage.phases[1].process(action.name), stage.phases[2])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment