Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #59 from AndreasMadsen/rss-category
do not seperate rss catgories by comma
- Loading branch information
Showing
3 changed files
with
53 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
describe('feedparser', function(){ | ||
|
||
var feed = __dirname + '/feeds/category-feed.xml' | ||
, meta = {} | ||
, articles = {} | ||
; | ||
|
||
describe('categories with comma in them', function(){ | ||
before(function(done){ | ||
FeedParser.parseFile(feed, function (error, _meta, _articles) { | ||
assert.ifError(error); | ||
meta = _meta; | ||
articles = _articles; | ||
done(); | ||
}); | ||
}); | ||
describe('article', function(){ | ||
it('should should not seperate by comma', function() { | ||
assert.deepEqual(articles[0].categories, [ | ||
'Water Pollution', | ||
'Gowanus Canal (Brooklyn, NY)' | ||
]); | ||
}); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<?xml-stylesheet type='text/xsl' href='http://rss.nytimes.com/xsl/eng/rss.xsl'?> | ||
<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" version="2.0"> | ||
<channel> | ||
<atom:link href="http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml" rel="self" type="application/rss+xml"/> | ||
<title>NYT > Home Page</title> | ||
<link>http://www.nytimes.com/pages/index.html?partner=rss&emc=rss</link> | ||
<description>HomePage</description> | ||
<language>en-us</language> | ||
<copyright>Copyright 2013 The New York Times Company</copyright> | ||
<pubDate>Sun, 05 May 2013 17:21:47 GMT</pubDate> | ||
<lastBuildDate>Sun, 05 May 2013 17:21:47 GMT</lastBuildDate> | ||
<item> | ||
<atom:link href="http://www.nytimes.com/2013/05/06/nyregion/epa-plan-to-clean-up-gowanus-canal-meets-local-resistance.html?partner=rss&emc=rss" rel="standout"/> | ||
<title>E.P.A. Plan to Clean Up Gowanus Canal Meets Local Resistance</title> | ||
<link>http://www.nytimes.com/2013/05/06/nyregion/epa-plan-to-clean-up-gowanus-canal-meets-local-resistance.html?partner=rss&emc=rss</link> | ||
<description>Removed for overview ...</description> | ||
<category domain="http://www.nytimes.com/namespaces/keywords/des">Water Pollution</category> | ||
<category domain="http://www.nytimes.com/namespaces/keywords/nyt_geo">Gowanus Canal (Brooklyn, NY)</category> | ||
<pubDate>Sun, 05 May 2013 17:15:11 GMT</pubDate> | ||
</item> | ||
</channel> | ||
</rss> |