Skip to content

Commit

Permalink
Add back a test.
Browse files Browse the repository at this point in the history
  • Loading branch information
cmaddox5 committed Dec 19, 2024
1 parent e94b13d commit 943d97e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions apps/api_web/test/api_web/canary_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,13 @@ defmodule ApiWeb.CanaryTest do

assert_receive {:EXIT, ^pid, :normal}
end

test "stops with reason if given a value that is not a function for notify_fn" do
Process.flag(:trap_exit, true)

assert {:error, "expect function/0 for notify_fn, got nil"} =
Canary.start_link(notify_fn: nil)

assert_receive {:EXIT, _, "expect function/0 for notify_fn, got nil"}
end
end

0 comments on commit 943d97e

Please sign in to comment.