Skip to content

Commit ee2a624

Browse files
committed
Adding unit test to ensure we skip setting points to 0 for a create step.
1 parent 98fba8b commit ee2a624

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

tests/unit/test_steps.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,6 +1015,30 @@ def test_update_issue_points_removed(
10151015
)
10161016

10171017

1018+
def test_emptyupdate_issue_points_ignored(
1019+
action_context_factory,
1020+
mocked_jira,
1021+
action_params_factory,
1022+
webhook_event_change_factory,
1023+
):
1024+
action_context = action_context_factory(
1025+
operation=Operation.CREATE,
1026+
current_step="maybe_update_issue_points",
1027+
bug__see_also=["https://mozilla.atlassian.net/browse/JBI-234"],
1028+
jira__issue="JBI-234",
1029+
bug__cf_fx_points="---",
1030+
)
1031+
1032+
params = action_params_factory(
1033+
jira_project_key=action_context.jira.project,
1034+
)
1035+
steps.maybe_update_issue_points(
1036+
action_context, parameters=params, jira_service=JiraService(mocked_jira)
1037+
)
1038+
1039+
mocked_jira.update_issue_field.assert_not_called()
1040+
1041+
10181042
def test_update_issue_points_missing_in_map(
10191043
action_context_factory,
10201044
mocked_jira,

0 commit comments

Comments
 (0)