Skip to content

Commit

Permalink
test: add coverage for rejection of additional kwargs to gumbo
Browse files Browse the repository at this point in the history
  • Loading branch information
flavorjones committed May 24, 2024
1 parent f284df6 commit b924b4b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/html5/test_nokogumbo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,15 @@ def test_line_cdata
assert_equal(expected, frag.at_css("div").children.map(&:type))
end

it "raises an exception if an unexpected kwarg is provided" do
assert_raises(ArgumentError) do
Nokogiri::HTML5::Document.parse("<p>", foo: "bar")
end
assert_raises(ArgumentError) do
Nokogiri::HTML5::DocumentFragment.parse("<p>", Encoding::UTF_8, foo: "bar")
end
end

private

def buffer
Expand Down

0 comments on commit b924b4b

Please sign in to comment.