takes into account emails separated by commas without spaces
This commit is contained in:
@@ -4,7 +4,7 @@ class Management::UserInvitesController < Management::BaseController
|
||||
end
|
||||
|
||||
def create
|
||||
@emails = params[:emails].split
|
||||
@emails = params[:emails].split(",").map(&:strip)
|
||||
@emails.each do |email|
|
||||
Mailer.user_invite(email).deliver_later
|
||||
end
|
||||
|
||||
@@ -237,7 +237,7 @@ feature 'Emails' do
|
||||
login_as_manager
|
||||
visit new_management_user_invite_path
|
||||
|
||||
fill_in "emails", with: "john@example.com, ana@example.com, isable@example.com"
|
||||
fill_in "emails", with: " john@example.com, ana@example.com,isable@example.com "
|
||||
click_button "Send invites"
|
||||
|
||||
expect(page).to have_content "3 invitations have been sent."
|
||||
|
||||
Reference in New Issue
Block a user