Add notice when merging account
This commit is contained in:
parent
a480b31eb5
commit
5009c583ea
2 changed files with 3 additions and 0 deletions
|
@ -28,6 +28,8 @@ module Manager
|
|||
else
|
||||
preexisting_user.expert.merge(user.expert)
|
||||
end
|
||||
|
||||
flash[:notice] = "Le compte « #{targeted_email} » a absorbé le compte « #{user.email} »."
|
||||
end
|
||||
|
||||
redirect_to edit_manager_user_path(user)
|
||||
|
|
|
@ -68,6 +68,7 @@ describe Manager::UsersController, type: :controller do
|
|||
|
||||
expect(preexisting_user.instructeur).to match(instructeur)
|
||||
expect(preexisting_user.expert).to match(expert)
|
||||
expect(flash[:notice]).to match("Le compte « email.existant@domaine.fr » a absorbé le compte « ancien.email@domaine.fr ».")
|
||||
end
|
||||
|
||||
context 'and the preexisting account owns an instructeur and expert as well' do
|
||||
|
|
Loading…
Reference in a new issue