Create route for resending an app invite
Replace ApplicationInvitations._update_status() with revoke() because multiple functions used _update_status() and it was causing app roles to be disabled when they shouldn't have. Now app roles are disabled within the revoke function. Updated Invitations.resend() to accept user details so the invite info can be changed in the new invite
This commit is contained in:
@@ -595,6 +595,24 @@ def test_applications_revoke_invite(post_url_assert_status):
|
||||
post_url_assert_status(user, url, status)
|
||||
|
||||
|
||||
# applications.resend_invite
|
||||
def test_applications_resend_invite(post_url_assert_status):
|
||||
ccpo = UserFactory.create_ccpo()
|
||||
rando = UserFactory.create()
|
||||
application = ApplicationFactory.create()
|
||||
|
||||
for user, status in [(ccpo, 302), (application.portfolio.owner, 302), (rando, 404)]:
|
||||
app_role = ApplicationRoleFactory.create()
|
||||
invite = ApplicationInvitationFactory.create(role=app_role)
|
||||
|
||||
url = url_for(
|
||||
"applications.resend_invite",
|
||||
application_id=application.id,
|
||||
application_role_id=app_role.id,
|
||||
)
|
||||
post_url_assert_status(user, url, status)
|
||||
|
||||
|
||||
# task_orders.download_task_order_pdf
|
||||
def test_task_orders_download_task_order_pdf_access(get_url_assert_status, monkeypatch):
|
||||
monkeypatch.setattr(
|
||||
|
Reference in New Issue
Block a user