Files
grecia/spec/components/sdg_management/relations/index_component_spec.rb
Javi Martín 1d5f03be8c Add and apply RSpec/ReceiveMessages rubocop rule
This rule was added in rubocop-rspec 2.23.0. I didn't know this method
existed, and it makes the code more readable in some cases.
2023-09-08 13:31:42 +02:00

19 lines
575 B
Ruby

require "rails_helper"
describe SDGManagement::Relations::IndexComponent, controller: SDGManagement::RelationsController do
before do
allow(vc_test_controller).to receive_messages(
valid_filters: SDGManagement::RelationsController::FILTERS,
current_filter: SDGManagement::RelationsController::FILTERS.first
)
end
it "renders the search form" do
component = SDGManagement::Relations::IndexComponent.new(Proposal.none.page(1))
with_request_url("/anything") { render_inline component }
expect(page).to have_css "form.complex"
end
end