Skip to content

Commit

Permalink
Add new golden file test for NYT Cooking. TODO: Make sure the Ingredi…
Browse files Browse the repository at this point in the history
…ents and Procedure are parsed correctly. #5
  • Loading branch information
chimbori committed Oct 19, 2018
1 parent 9d9393e commit bbc24b2
Show file tree
Hide file tree
Showing 2 changed files with 1,913 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/test/java/com/chimbori/crux/articles/GoldenFilesTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,14 @@ public void testNYT2() {
assertEquals("https://cdn1.nyt.com/images/2010/12/22/world/22start-span/Start-articleLarge.jpg", article.imageUrl);
}

@Test
public void testNYTCooking() {
Article article = TestHelper.extractFromTestFile("https://cooking.nytimes.com/recipes/1018068-chicken-paprikash", "nyt-cooking.html");
assertEquals("Chicken Paprikash Recipe - NYT Cooking", article.title);
assertEquals("NYT Cooking", article.siteName);
assertStartsWith("Spices lose their flavor over time but few as quickly as paprika, which starts out tasting of pepper and sunshine", article.document.text());
}

@Test
public void testNature() {
Article article = TestHelper.extractFromTestFile("http://www.nature.com/news/2011/110411/full/472146a.html", "nature.html");
Expand Down
Loading

0 comments on commit bbc24b2

Please sign in to comment.