Merge pull request #5129 from consul/geozones

Do not show geozones when there are no geozones defined
This commit is contained in:
Senén Rodero
2023-06-30 17:21:20 +02:00
committed by GitHub
17 changed files with 169 additions and 16 deletions

View File

@@ -0,0 +1,19 @@
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