From 5c5f5ef4784a229b6d6a6ed74cabdc5f029b18a7 Mon Sep 17 00:00:00 2001 From: Carl Kittelberger Date: Mon, 20 Jun 2016 02:44:51 +0200 Subject: [PATCH] parsers/web: Compare URLs by their string representations instead. The Path can be different in that the original URL is missing the "/" at the beginning, however the resulting URL may very well contain a "/" at the beginning. In the resulting string representation this doesn't make any difference. --- parsers/web/parser_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parsers/web/parser_test.go b/parsers/web/parser_test.go index dfc84ad..7b71a98 100644 --- a/parsers/web/parser_test.go +++ b/parsers/web/parser_test.go @@ -114,7 +114,7 @@ func Test_Parser_Parse_IRCBotScience_Redirect(t *testing.T) { assert.Nil(t, result.Error) assert.Nil(t, result.UserError) assert.NotNil(t, result.FollowUrl) - assert.Equal(t, *originalUrl, *result.FollowUrl) + assert.Equal(t, originalUrl.String(), result.FollowUrl.String()) } func Test_Parser_Parse_Hash(t *testing.T) {