Skip to content

Commit

Permalink
ensure doc cache is working
Browse files Browse the repository at this point in the history
  • Loading branch information
alaingilbert committed Aug 21, 2022
1 parent 5f81582 commit 6508da9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/parser/parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,10 @@ func TestParsePageContent(t *testing.T) {
assert.NoError(t, parserErr(ParsePage[DefensesPage](v7.NewExtractor(), MustReadFile("../../samples/v7/defenses.html"))))
assert.Error(t, parserErr(ParsePage[DefensesPage](v7.NewExtractor(), MustReadFile("../../samples/v7/overview.html"))))
}

func TestParsePageGetDoc(t *testing.T) {
p, _ := ParsePage[DefensesPage](v7.NewExtractor(), MustReadFile("../../samples/v7/defenses.html"))
assert.Nil(t, p.doc)
p.GetDoc()
assert.NotNil(t, p.doc)
}

0 comments on commit 6508da9

Please sign in to comment.