Skip to content

Commit

Permalink
Test aginast PR: toshimaru#77
Browse files Browse the repository at this point in the history
  • Loading branch information
toshimaru committed Mar 23, 2019
1 parent c2b783c commit 53386df
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions test/test_jekyll-toc.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# frozen_string_literal: true

require 'test_helper'

class TestTableOfContentsFilter < Minitest::Test
include Jekyll::TableOfContentsFilter

DUMMY_HTML = "<div>Dummy HTML Content</div>"

def setup
stubbed_context = Struct.new(:registers)
@context = stubbed_context.new(page: "xxx")
@context
end

def test_toc_only
assert_empty toc_only(DUMMY_HTML)
end

def test_inject_anchors
assert_equal inject_anchors(DUMMY_HTML), DUMMY_HTML
end

def test_toc
assert_equal toc(DUMMY_HTML), DUMMY_HTML
end
end

0 comments on commit 53386df

Please sign in to comment.