sqm-dashboards/spec/views/home/index.html.erb_spec.rb
Nelson Jovel b111b2f106 Bump rails to 7 and get tests passing. Also modified rakefile so rake
command would continue to run rspec as the default command.  Added
stylesheets to assets.rb so they'll be included when precompiling
assets in production.
2022-01-21 11:49:35 +01:00

15 lines
416 B
Ruby

require 'rails_helper'
describe 'home/index' do
subject { Nokogiri::HTML(rendered) }
before :each do
assign :districts, [create(:district), create(:district)]
assign :categories, [CategoryPresenter.new(category: create(:category))]
render
end
it 'renders a dropdown with districts and a select a district prompt' do
expect(subject.css('#district-dropdown option').count).to eq 3
end
end