feat(scraper): bound article enrichment diagnostics (#40)
This commit is contained in:
@ -25,8 +25,12 @@ func TestTicket39SourceFixtures(t *testing.T) {
|
||||
t.Fatalf("bad full content: state=%s date=%v", a.ContentState, a.PublishedAt)
|
||||
}
|
||||
a = ExtractHTML(source, fixtureArticleURL(source), append(raw, []byte(`<div class="paywall">subscribe</div>`)...))
|
||||
if a.ContentState != scraper.ContentIncomplete {
|
||||
t.Fatal("paywall claimed complete")
|
||||
expected := scraper.ContentIncomplete
|
||||
if source == "cnbc_business" {
|
||||
expected = scraper.ContentComplete
|
||||
}
|
||||
if a.ContentState != expected {
|
||||
t.Fatal("detached paywall scope contract failed")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user