test/test_index.rb in review-2.0.0 vs test/test_index.rb in review-2.1.0
- old
+ new
@@ -26,9 +26,19 @@
item = items[0]
assert_equal 'foo', item.id
assert_equal 'bar\\a\\$buz', item.content
end
+ def test_footnote_index_key?
+ fn = Book::FootnoteIndex.parse(['//footnote[foo][bar]'])
+ assert_equal true, fn.key?('foo')
+
+ ## for compatibility
+ # rubocop:disable Style/PreferredHashMethods
+ assert_equal true, fn.has_key?('foo')
+ # rubocop:enable Style/PreferredHashMethods
+ end
+
def test_HeadelineIndex
src = <<-EOB
= chap1
== sec1-1
== sec1-2