From e04def3d589d0769c2884fd3a15458eebf199531 Mon Sep 17 00:00:00 2001 From: Mattias Wadman Date: Fri, 7 May 2021 18:38:47 +0200 Subject: [PATCH] Update expected test values --- goutubedl_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/goutubedl_test.go b/goutubedl_test.go index 74ed1a1..254c87e 100644 --- a/goutubedl_test.go +++ b/goutubedl_test.go @@ -98,7 +98,7 @@ func TestParseInfo(t *testing.T) { url string expectedTitle string }{ - {"https://soundcloud.com/avalonemerson/avalon-emerson-live-at-printworks-london-march-2017", "Avalon Emerson Live at Printworks London"}, + {"https://soundcloud.com/avalonemerson/avalon-emerson-live-at-printworks-london-march-2017", "Avalon Emerson Live at Printworks London 2017"}, {"https://www.infoq.com/presentations/Simple-Made-Easy", "Simple Made Easy"}, {"https://www.youtube.com/watch?v=uVYWQJ5BB_w", "A Radiolab Producer on the Making of a Podcast"}, } { @@ -188,9 +188,9 @@ func TestTestUnsupportedURL(t *testing.T) { if ydlResultErr == nil { t.Errorf("expected unsupported url") } - expectedErr := "Unsupported URL: https://www.google.com" - if ydlResultErr != nil && ydlResultErr.Error() != expectedErr { - t.Errorf("expected error %q got %q", expectedErr, ydlResultErr.Error()) + expectedErrPrefix := "Unsupported URL: https://www.google.com" + if ydlResultErr != nil && !strings.HasPrefix(ydlResultErr.Error(), expectedErrPrefix) { + t.Errorf("expected error prefix %q got %q", expectedErrPrefix, ydlResultErr.Error()) } }