From 40d0f1e1e3d7127ca36d5c91f80c90fb979ac6f4 Mon Sep 17 00:00:00 2001 From: Evgeny Kuznetsov Date: Tue, 28 Jan 2020 15:24:47 +0300 Subject: improve testing --- main_test.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'main_test.go') 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") -- cgit v1.2.3