-
-
Notifications
You must be signed in to change notification settings - Fork 503
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4605 from ewoknock/4596-restore_reset_password_ca…
…pability 4596-Restore "reset password" capability -- banks to reset password for partners.
- Loading branch information
Showing
4 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -111,4 +111,23 @@ | |
end | ||
end | ||
end | ||
|
||
describe "POST #reset_password" do | ||
let!(:partner_user) do | ||
UserInviteService.invite( | ||
email: "[email protected]", | ||
name: "Meow Mix", | ||
roles: [Role::PARTNER], | ||
resource: partner | ||
) | ||
end | ||
|
||
context "when a bank needs to reset a partner user's password" do | ||
it "resends the reset password email and redirects back to root_path" do | ||
expect { post reset_password_partner_user_path(default_params.merge(partner_id: partner, id: partner_user)) }.to change { ActionMailer::Base.deliveries.count }.by(1) | ||
expect(response).to redirect_to(root_path) | ||
expect(flash[:notice]).to eq("Password e-mail sent!") | ||
end | ||
end | ||
end | ||
end |