diff options
| author | Christine Dodrill <me@christine.website> | 2018-08-22 03:17:59 +0000 |
|---|---|---|
| committer | Christine Dodrill <me@christine.website> | 2018-08-22 03:17:59 +0000 |
| commit | 6b7d6dcc49c6cbd83af70d97d01b700c8fb0c393 (patch) | |
| tree | 60bd319655e77afb0e3737cc9070d5111a41f22b /vendor/github.com/Xe/jsonfeed | |
| parent | 5a8b8dc48f33c44fd41ac27c1fb4185de1d87d41 (diff) | |
| download | xesite-6b7d6dcc49c6cbd83af70d97d01b700c8fb0c393.tar.xz xesite-6b7d6dcc49c6cbd83af70d97d01b700c8fb0c393.zip | |
add analytics via segment again
Diffstat (limited to 'vendor/github.com/Xe/jsonfeed')
| -rw-r--r-- | vendor/github.com/Xe/jsonfeed/jsonfeed_test.go | 43 | ||||
| -rw-r--r-- | vendor/github.com/Xe/jsonfeed/testdata/feed.json | 21 |
2 files changed, 0 insertions, 64 deletions
diff --git a/vendor/github.com/Xe/jsonfeed/jsonfeed_test.go b/vendor/github.com/Xe/jsonfeed/jsonfeed_test.go deleted file mode 100644 index 29d9165..0000000 --- a/vendor/github.com/Xe/jsonfeed/jsonfeed_test.go +++ /dev/null @@ -1,43 +0,0 @@ -// This Source Code Form is subject to the terms of the Mozilla Public -// License, v. 2.0. If a copy of the MPL was not distributed with this -// file, You can obtain one at http://mozilla.org/MPL/2.0/ - -package jsonfeed_test - -import ( - "os" - "testing" - "time" - - "github.com/st3fan/jsonfeed" - "github.com/stretchr/testify/assert" -) - -func Test_ParseSimple(t *testing.T) { - r, err := os.Open("testdata/feed.json") - assert.NoError(t, err, "Could not open testdata/feed.json") - - feed, err := jsonfeed.Parse(r) - assert.NoError(t, err, "Could not parse testdata/feed.json") - - assert.Equal(t, "https://jsonfeed.org/version/1", feed.Version) - assert.Equal(t, "JSON Feed", feed.Title) - assert.Equal(t, "JSON Feed is a ...", feed.Description) - assert.Equal(t, "https://jsonfeed.org/", feed.HomePageURL) - assert.Equal(t, "https://jsonfeed.org/feed.json", feed.FeedURL) - assert.Equal(t, "This feed allows ...", feed.UserComment) - assert.Equal(t, "https://jsonfeed.org/graphics/icon.png", feed.Favicon) - assert.Equal(t, "Brent Simmons and Manton Reece", feed.Author.Name) - - assert.Equal(t, 1, len(feed.Items)) - - assert.Equal(t, "https://jsonfeed.org/2017/05/17/announcing_json_feed", feed.Items[0].ID) - assert.Equal(t, "https://jsonfeed.org/2017/05/17/announcing_json_feed", feed.Items[0].URL) - assert.Equal(t, "Announcing JSON Feed", feed.Items[0].Title) - assert.Equal(t, "<p>We ...", feed.Items[0].ContentHTML) - - datePublished, err := time.Parse("2006-01-02T15:04:05-07:00", "2017-05-17T08:02:12-07:00") - assert.NoError(t, err, "Could not parse timestamp") - - assert.Equal(t, datePublished, feed.Items[0].DatePublished) -} diff --git a/vendor/github.com/Xe/jsonfeed/testdata/feed.json b/vendor/github.com/Xe/jsonfeed/testdata/feed.json deleted file mode 100644 index ad4bbe1..0000000 --- a/vendor/github.com/Xe/jsonfeed/testdata/feed.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "version": "https://jsonfeed.org/version/1", - "title": "JSON Feed", - "description": "JSON Feed is a ...", - "home_page_url": "https://jsonfeed.org/", - "feed_url": "https://jsonfeed.org/feed.json", - "user_comment": "This feed allows ...", - "favicon": "https://jsonfeed.org/graphics/icon.png", - "author": { - "name": "Brent Simmons and Manton Reece" - }, - "items": [ - { - "id": "https://jsonfeed.org/2017/05/17/announcing_json_feed", - "url": "https://jsonfeed.org/2017/05/17/announcing_json_feed", - "title": "Announcing JSON Feed", - "content_html": "<p>We ...", - "date_published": "2017-05-17T08:02:12-07:00" - } - ] -} |
