Skip to content

Commit

Permalink
Fix: update param name for expiry (#2043)
Browse files Browse the repository at this point in the history
  • Loading branch information
thekaveman authored Apr 19, 2024
2 parents f7fbf80 + 4c2652f commit 84b0c8b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions benefits/enrollment/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def index(request):
if not already_enrolled:
# enroll user with an expiration date, return success
client.link_concession_group_funding_source(
group_id=group_id, funding_source_id=funding_source.id, expiry_date=session.enrollment_expiry(request)
group_id=group_id, funding_source_id=funding_source.id, expiry=session.enrollment_expiry(request)
)
return success(request)
else: # already_enrolled
Expand All @@ -111,7 +111,7 @@ def index(request):
client.update_concession_group_funding_source_expiry(
group_id=group_id,
funding_source_id=funding_source.id,
expiry_date=session.enrollment_expiry(request),
expiry=session.enrollment_expiry(request),
)
return success(request)
else:
Expand All @@ -125,7 +125,7 @@ def index(request):
client.update_concession_group_funding_source_expiry(
group_id=group_id,
funding_source_id=funding_source.id,
expiry_date=session.enrollment_expiry(request),
expiry=session.enrollment_expiry(request),
)
return success(request)
else:
Expand Down
8 changes: 4 additions & 4 deletions tests/pytest/enrollment/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ def test_index_eligible_post_valid_form_success_supports_expiration(
mock_client.link_concession_group_funding_source.assert_called_once_with(
funding_source_id=mocked_funding_source.id,
group_id=model_EligibilityType_supports_expiration.group_id,
expiry_date=mocked_session_enrollment_expiry.return_value,
expiry=mocked_session_enrollment_expiry.return_value,
)
assert response.status_code == 200
assert response.template_name == TEMPLATE_SUCCESS
Expand Down Expand Up @@ -343,7 +343,7 @@ def test_index_eligible_post_valid_form_success_supports_expiration_no_expiry(
mock_client.update_concession_group_funding_source_expiry.assert_called_once_with(
funding_source_id=mocked_funding_source.id,
group_id=model_EligibilityType_supports_expiration.group_id,
expiry_date=mocked_session_enrollment_expiry.return_value,
expiry=mocked_session_enrollment_expiry.return_value,
)
assert response.status_code == 200
assert response.template_name == TEMPLATE_SUCCESS
Expand Down Expand Up @@ -414,7 +414,7 @@ def test_index_eligible_post_valid_form_success_supports_expiration_is_expired(
mock_client.update_concession_group_funding_source_expiry.assert_called_once_with(
funding_source_id=mocked_funding_source.id,
group_id=model_EligibilityType_supports_expiration.group_id,
expiry_date=mocked_session_enrollment_expiry.return_value,
expiry=mocked_session_enrollment_expiry.return_value,
)
assert response.status_code == 200
assert response.template_name == TEMPLATE_SUCCESS
Expand Down Expand Up @@ -524,7 +524,7 @@ def test_index_eligible_post_valid_form_success_supports_expiration_is_within_re
mock_client.update_concession_group_funding_source_expiry.assert_called_once_with(
funding_source_id=mocked_funding_source.id,
group_id=model_EligibilityType_supports_expiration.group_id,
expiry_date=mocked_session_enrollment_expiry.return_value,
expiry=mocked_session_enrollment_expiry.return_value,
)
assert response.status_code == 200
assert response.template_name == TEMPLATE_SUCCESS
Expand Down

0 comments on commit 84b0c8b

Please sign in to comment.