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 #3432 from consul/fix_exception_with_wrong_token
Fix exception when confirming an invalid token
- Loading branch information
Showing
2 changed files
with
14 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
require "rails_helper" | ||
|
||
describe Users::ConfirmationsController do | ||
before do | ||
@request.env["devise.mapping"] = Devise.mappings[:user] | ||
end | ||
|
||
describe "GET show" do | ||
it "returns a 404 code with a wrong token" do | ||
expect { get :show, token: "non_existent" }.to raise_error ActiveRecord::RecordNotFound | ||
end | ||
end | ||
end |