DEPRECATION WARNING: Using positional arguments in functional tests
has been deprecated, in favor of keyword arguments, and will be
removed in Rails 5.1.
Deprecated style:
get :show, { id: 1 }, nil, { notice: "Flash message" }
New keyword style:
get :show, params: { id: 1 }, flash: { notice: "Flash message" }
14 lines
345 B
Ruby
14 lines
345 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
|