diff options
author | Evgeny Kuznetsov <evgeny@kuznetsov.md> | 2020-01-28 15:24:47 +0300 |
---|---|---|
committer | Evgeny Kuznetsov <evgeny@kuznetsov.md> | 2020-01-28 15:24:47 +0300 |
commit | 40d0f1e1e3d7127ca36d5c91f80c90fb979ac6f4 (patch) | |
tree | 1b124504b894f0f36213ddb1e87f44178097700c /main_test.go | |
parent | f1c749597bcf5588618eccbd2fbb7797b42eb713 (diff) | |
download | radiorus-rss-40d0f1e1e3d7127ca36d5c91f80c90fb979ac6f4.tar.gz radiorus-rss-40d0f1e1e3d7127ca36d5c91f80c90fb979ac6f4.zip |
improve testing
Diffstat (limited to 'main_test.go')
-rw-r--r-- | main_test.go | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/main_test.go b/main_test.go index 702146f..b3fbde4 100644 --- a/main_test.go +++ b/main_test.go @@ -24,7 +24,6 @@ import ( "net/http/httptest" "os" "path/filepath" - "sync" "testing" "github.com/gorilla/feeds" @@ -79,12 +78,7 @@ func TestServedFeed(t *testing.T) { server := helperMockServer(t) defer helperCleanupServer(t) - feed := getFeed(fmt.Sprintf("%s/brand/57083/episodes", server.URL)) - - var wg sync.WaitGroup - wg.Add(1) - describeFeed(feed, &wg) - wg.Wait() + feed := processURL(fmt.Sprintf("%s/brand/57083/episodes", server.URL)) actual := bytes.ReplaceAll(createFeed(feed), []byte(server.URL), []byte(fakeURL)) golden := filepath.Join("testdata", t.Name()+".golden") |