Files
grecia/spec/controllers/legislation/processes_controller_spec.rb
Javi Martín 040ec9f588 Use be_successful instead of be_success
We were getting a deprecation message in Rails 5.2:

> The success? predicate is deprecated and will be removed in Rails 6.0.
> Please use successful? as provided by Rack::Response::Helpers.
2020-10-15 16:21:40 +02:00

14 lines
402 B
Ruby

require "rails_helper"
describe Legislation::ProcessesController do
let(:legislation_process) { create(:legislation_process, end_date: Date.current - 1.day) }
it "download excel file test" do
create(:legislation_question, process: legislation_process, title: "Question 1")
get :summary, params: { id: legislation_process, format: :xlsx }
expect(response).to be_successful
end
end