Files
nairobi/spec/components/layout/top_links_component_spec.rb
2021-09-08 12:39:36 +02:00

20 lines
473 B
Ruby

require "rails_helper"
describe Layout::TopLinksComponent do
describe "#render?" do
it "renders when a content block is defined" do
create(:site_customization_content_block, name: "top_links")
render_inline Layout::TopLinksComponent.new
expect(page).to have_css "ul"
end
it "does not render when no content block is defined" do
render_inline Layout::TopLinksComponent.new
expect(page).not_to have_css "ul"
end
end
end