Files
nairobi/spec/components/proposals/geozones_component_spec.rb
2023-06-19 14:37:01 +02:00

20 lines
429 B
Ruby

require "rails_helper"
describe Proposals::GeozonesComponent do
let(:component) { Proposals::GeozonesComponent.new() }
it "is not rendered when there are no geozones defined" do
render_inline component
expect(page).not_to have_content "Districts"
end
it "is rendered when there are geozones defined" do
create(:geozone)
render_inline component
expect(page).to have_content "Districts"
end
end