mirror of
https://github.com/Luzifer/twitch-bot.git
synced 2024-12-20 11:51:17 +00:00
[linkcheck] Fix tests broken by domain grabbers
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
1298b76da9
commit
0ebc68254d
1 changed files with 6 additions and 3 deletions
|
@ -104,6 +104,7 @@ func TestScanForLinks(t *testing.T) {
|
|||
ExpectedLinks: []string{
|
||||
"http://example.com",
|
||||
},
|
||||
ExpectedContains: true,
|
||||
},
|
||||
// Case: link is obfuscated using space and braces
|
||||
{
|
||||
|
@ -112,6 +113,7 @@ func TestScanForLinks(t *testing.T) {
|
|||
ExpectedLinks: []string{
|
||||
"http://example.com",
|
||||
},
|
||||
ExpectedContains: true,
|
||||
},
|
||||
// Case: multiple links in one message
|
||||
{
|
||||
|
@ -164,9 +166,10 @@ func TestScanForLinks(t *testing.T) {
|
|||
},
|
||||
// Case: Multiple spaces in the link
|
||||
{
|
||||
Heuristic: true,
|
||||
Message: "Hey there, see my new project on exa mpl e. com! Get it fast now!",
|
||||
ExpectedLinks: []string{"http://example.com"},
|
||||
Heuristic: true,
|
||||
Message: "Hey there, see my new project on exa mpl e. com! Get it fast now!",
|
||||
ExpectedLinks: []string{"http://example.com"},
|
||||
ExpectedContains: true,
|
||||
},
|
||||
// Case: Dot in the end of the link with space
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue