Files
nairobi/spec/controllers/legislation/proposals_controller_spec.rb
Javi Martín abd6a1971f Move redirection test to controller specs
We make the test faster and avoid a strange issue with `current_path` in
JavaScript tests.

We should probably have done this in commit ec1874325.
2021-03-31 14:42:20 +02:00

12 lines
329 B
Ruby

require "rails_helper"
describe Legislation::ProposalsController do
describe "GET new" do
it "redirects to register path if user is not logged in" do
get :new, params: { process_id: create(:legislation_process, :in_proposals_phase).id }
expect(response).to redirect_to new_user_session_path
end
end
end