You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
sqm-dashboards/spec/views/home/index.html.erb_spec.rb

16 lines
416 B

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