Instance variables might lead to hard-to-detect issues, since using a nonexistent instance variable will return `nil` instead of raising an error.
14 lines
344 B
Ruby
14 lines
344 B
Ruby
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, params: { token: "non_existent" } }.to raise_error ActiveRecord::RecordNotFound
|
|
end
|
|
end
|
|
end
|