Merge pull request #5129 from consul/geozones
Do not show geozones when there are no geozones defined
This commit is contained in:
19
spec/components/proposals/geozones_component_spec.rb
Normal file
19
spec/components/proposals/geozones_component_spec.rb
Normal 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
|
||||
Reference in New Issue
Block a user