summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/correction_plugin_test.exs12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/correction_plugin_test.exs b/test/correction_plugin_test.exs
new file mode 100644
index 0000000..6999b9f
--- /dev/null
+++ b/test/correction_plugin_test.exs
@@ -0,0 +1,12 @@
+defmodule LSG.IRC.CorrectionPluginTest do
+ use ExUnit.Case
+
+ test "works" do
+ message = %{text: "s/pouet/prout", replyfun: fn(x) ->
+ assert x == "correction: <oof> prout les salopes"
+ end, network: "test", channel: "#test"}
+ hist = %{text: "pouet les salopes", sender: %{nick: "oof"}}
+ LSG.IRC.CorrectionPlugin.correction(message, %{"test/#test" => [hist]})
+ end
+
+end