summaryrefslogtreecommitdiff
path: root/test/correction_plugin_test.exs
blob: b5a739423c717ac8c4c871c0a776b1a77cb21341 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
defmodule Nola.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"}}
    Nola.IRC.CorrectionPlugin.correction(message, %{"test/#test" => [hist]})
  end

end