Add long description to goals

This commit is contained in:
Javi Martín
2021-01-23 02:09:59 +01:00
committed by taitus
parent b8cd758437
commit b0a6c20bc0
5 changed files with 73 additions and 4 deletions

View File

@@ -0,0 +1,27 @@
require "rails_helper"
describe SDG::Goals::ShowComponent, type: :component do
let!(:goal_1) { SDG::Goal[1] }
before do
Setting["feature.sdg"] = true
end
it "renders a heading" do
component = SDG::Goals::ShowComponent.new(goal_1)
render_inline component
expect(page).to have_css ".goal-title"
expect(page).to have_content "No Poverty"
end
it "renders a long description" do
component = SDG::Goals::ShowComponent.new(goal_1)
render_inline component
expect(page).to have_css "#description_goal_#{goal_1.code}"
expect(page).to have_content "Globally, the number of people living in extreme poverty"
end
end