summaryrefslogtreecommitdiffstats
path: root/bot/plugins_test.go
diff options
context:
space:
mode:
authorRobert S. Gerus <ar@bash.org.pl>2015-12-22 11:38:11 +0100
committerRobert S. Gerus <ar@bash.org.pl>2015-12-22 11:38:11 +0100
commit183404c9e7fe12e64987aa2543281c1b8db9a28c (patch)
treef3e6f60e1a9ba1b6ca3e8ea04205711e2a7e6bc7 /bot/plugins_test.go
parentd2621d1c8a655c6fffd131678c375507c7b6f014 (diff)
parente577b1adb07529e79b244451d84b9e04321d3ffd (diff)
downloadgorepost-183404c9e7fe12e64987aa2543281c1b8db9a28c.tar.gz
gorepost-183404c9e7fe12e64987aa2543281c1b8db9a28c.tar.bz2
gorepost-183404c9e7fe12e64987aa2543281c1b8db9a28c.tar.xz
gorepost-183404c9e7fe12e64987aa2543281c1b8db9a28c.zip
Merge pull request #49 from arachnist/fix-youtube
Reworked url title fetching.
Diffstat (limited to 'bot/plugins_test.go')
-rw-r--r--bot/plugins_test.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/bot/plugins_test.go b/bot/plugins_test.go
index 5b68922..d20602a 100644
--- a/bot/plugins_test.go
+++ b/bot/plugins_test.go
@@ -809,6 +809,30 @@ var variableOutputTestEvents = []struct {
outRegex: *regexp.MustCompile("^at:"),
function: at,
},
+ {
+ in: irc.Message{
+ Command: "PRIVMSG",
+ Trailing: "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
+ Params: []string{"#testchan-1"},
+ Prefix: &irc.Prefix{
+ Name: "idontexist",
+ },
+ },
+ outRegex: *regexp.MustCompile("^↳ title: Rick Astley - Never Gonna Give You Up"),
+ function: linktitle,
+ },
+ {
+ in: irc.Message{
+ Command: "PRIVMSG",
+ Trailing: "http://youtu.be/dQw4w9WgXcQ",
+ Params: []string{"#testchan-1"},
+ Prefix: &irc.Prefix{
+ Name: "idontexist",
+ },
+ },
+ outRegex: *regexp.MustCompile("^↳ title: Rick Astley - Never Gonna Give You Up"),
+ function: linktitle,
+ },
}
func TestFunctionsWithVariableOutput(t *testing.T) {