package nomad import "testing" var sampleRSS = ` kyle@ nomad https://nomad.wntrmute.net/u/kyle.rss An experiment in MMS micropublishing http://www.rssboard.org/rss-specification python-feedgen Thu, 04 Nov 2021 16:44:41 +0000 kyle @ 2021-11-03 10:36:44 PDT: At least not with images, I guess. https://nomad.wntrmute.net/p/1996 At least not with images, I guess. https://nomad.wntrmute.net/p/1996 Wed, 03 Nov 2021 10:36:44 -0700 kyle @ 2021-11-03 10:35:53 PDT: This thing isn't working at all... https://nomad.wntrmute.net/p/1995 This thing isn't working at all... https://nomad.wntrmute.net/p/1995 Wed, 03 Nov 2021 10:35:53 -0700 kyle @ 2021-11-03 02:38:48 PDT: And a plain text post too... https://nomad.wntrmute.net/p/1994 And a plain text post too... https://nomad.wntrmute.net/p/1994 Wed, 03 Nov 2021 02:38:48 -0700 kyle @ 2021-11-03 02:23:29 PDT: Working on a thing that needs a test post so here’s a picture of... https://nomad.wntrmute.net/p/1993 Working on a thing that needs a test post so here’s a picture of some mead. https://nomad.wntrmute.net/p/1993 Wed, 03 Nov 2021 02:23:29 -0700 kyle @ 2021-10-31 22:44:56 PDT: Fall colours in Oakland. https://nomad.wntrmute.net/p/1991 Fall colours in Oakland. https://nomad.wntrmute.net/p/1991 Sun, 31 Oct 2021 22:44:56 -0700 kyle @ 2021-10-25 20:02:11 PDT: I am the operator of my pocket ... operator. https://nomad.wntrmute.net/p/1990 I am the operator of my pocket ... operator. https://nomad.wntrmute.net/p/1990 Mon, 25 Oct 2021 20:02:11 -0700 kyle @ 2021-10-24 19:28:09 PDT: The Yeti being a backup battery that I got with a solar panel fo... https://nomad.wntrmute.net/p/1989 The Yeti being a backup battery that I got with a solar panel for offgrid stuff, good test for it though https://nomad.wntrmute.net/p/1989 Sun, 24 Oct 2021 19:28:09 -0700 kyle @ 2021-10-24 19:27:14 PDT: Power's out, fortunately I have the Yeti https://nomad.wntrmute.net/p/1988 Power's out, fortunately I have the Yeti https://nomad.wntrmute.net/p/1988 Sun, 24 Oct 2021 19:27:14 -0700 kyle @ 2021-10-24 13:22:47 PDT: Finally exploring the trail behind my apartment, of course in th... https://nomad.wntrmute.net/p/1986 Finally exploring the trail behind my apartment, of course in the rain. https://nomad.wntrmute.net/p/1986 Sun, 24 Oct 2021 13:22:47 -0700 kyle @ 2021-10-24 09:33:15 PDT: From today’s Readwise email… https://nomad.wntrmute.net/p/1984 From today’s Readwise email… https://nomad.wntrmute.net/p/1984 Sun, 24 Oct 2021 09:33:15 -0700 ` func TestFetchRSS(t *testing.T) { source := NewStringSource(sampleRSS) items, err := FetchRSS(source) if err != nil { t.Fatal(err) } if len(items) == 0 { t.Fatal("no items parsed from RSS") } }