-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MNOE-819] Update error handling when inviting user to organization #595
base: 3.3
Are you sure you want to change the base?
Conversation
Can you rebase and open the PR against |
67f0cf2
to
68b9bfc
Compare
68b9bfc
to
1dc62fe
Compare
@ouranos Updated to branch 3.3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comments, needs another rebase as well ;)
@@ -73,14 +73,19 @@ def invite_member | |||
user = MnoEnterprise::User.find_by(email: user_params[:email]) || create_unconfirmed_user(user_params) | |||
|
|||
# Create the invitation | |||
invite = @organization.org_invites.create( | |||
invite = MnoEnterprise::OrgInvite.create( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this change?
@@ -157,7 +157,7 @@ def partial_hash_for_arrears(arrear) | |||
# Track the api call | |||
@api_call = false | |||
stub = -> { @api_call = true; from_api(org_invite) } | |||
api_stub_for(post: "/organizations/#{organization.id}/org_invites", response: stub) | |||
api_stub_for(post: "/org_invites", response: stub) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need a spec for when the invitation is not saved.
I think persisted?
is just checking the id
so you can have a stub without id for this case.
@ouranos Ready for review. Leaving comments in JIRA.