Files
nairobi/spec/components/sdg/goals/index_component_spec.rb
2021-01-28 20:02:46 +01:00

26 lines
618 B
Ruby

require "rails_helper"
describe SDG::Goals::IndexComponent, type: :component do
let!(:goals) { SDG::Goal.all }
let!(:phases) { SDG::Phase.all }
let!(:component) { SDG::Goals::IndexComponent.new(goals, phases) }
before do
Setting["feature.sdg"] = true
end
it "renders a heading" do
render_inline component
expect(page).to have_css "h1", exact_text: "Sustainable Development Goals"
end
it "renders phases" do
render_inline component
expect(page).to have_content "Sensitization"
expect(page).to have_content "Planning"
expect(page).to have_content "Monitoring"
end
end