From b7cd1745b1d1ec0cf3125a71d57ab7e36c209355 Mon Sep 17 00:00:00 2001 From: Bel LaPointe Date: Wed, 10 Oct 2018 13:39:17 -0600 Subject: [PATCH] Add test to show a feed self-updating --- main_test.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/main_test.go b/main_test.go index 217e2c1..e589a34 100644 --- a/main_test.go +++ b/main_test.go @@ -82,7 +82,7 @@ func Test_Core(t *testing.T) { { method: "post", path: "api/feed", - body: `{"url":"` + rssserver.URL + `/feed", "refresh":"1m", "items":"[AB]", "content":"25"}`, + body: `{"url":"` + rssserver.URL + `/feed", "refresh":"30m", "items":"[AB]", "content":"2"}`, status: 200, post: func() { time.Sleep(time.Second * 10) }, }, @@ -98,6 +98,13 @@ func Test_Core(t *testing.T) { body: "http___127_0_0_1_" + strings.Split(rssserver.URL, ":")[2] + "_feed.20181010__itemB", status: 200, }, + { + method: "post", + path: "api/feed", + body: `{"url":"` + rssserver.URL + `/feed", "refresh":"10s", "items":"[AB]", "content":"1"}`, + status: 200, + post: func() { time.Sleep(time.Second * 15) }, + }, } for _, c := range cases { c.method = strings.ToUpper(c.method)