Sha256: be073b21b415f0a6bbcce6b854d95ba10b365230ee2cd3f950f2afbd98696295
Contents?: true
Size: 513 Bytes
Versions: 11
Compression:
Stored size: 513 Bytes
Contents
# frozen_string_literal: true require 'test_helper' class TestInjectAnchorsFilter < Minitest::Test include TestHelpers def setup read_html_and_create_parser end def test_injects_anchors_into_content html = @parser.inject_anchors_into_html assert_match(%r{<a class="anchor" href="#simple-h1" aria-hidden="true"><span.*span></a>Simple H1}, html) end def test_does_not_inject_toc html = @parser.inject_anchors_into_html assert_nil(/<ul class="section-nav">/ =~ html) end end
Version data entries
11 entries across 11 versions & 1 rubygems