Files
nairobi/spec/components/widget/feeds/process_component_spec.rb
2021-09-08 12:39:36 +02:00

24 lines
594 B
Ruby

require "rails_helper"
describe Widget::Feeds::ProcessComponent do
let(:process) { create(:legislation_process, sdg_goals: [SDG::Goal[1]]) }
let(:component) { Widget::Feeds::ProcessComponent.new(process) }
before do
Setting["feature.sdg"] = true
Setting["sdg.process.legislation"] = true
end
it "renders a card with link" do
render_inline component
expect(page).to have_link href: "/legislation/processes/#{process.to_param}"
end
it "renders a plain tag list" do
render_inline component
expect(page).to have_css("img[alt='1. No Poverty']")
end
end