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.
12 lines
329 B
Ruby
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
|