diff --git a/apps/api_web/test/api_web/canary_test.exs b/apps/api_web/test/api_web/canary_test.exs index 06be1785..d29b268d 100644 --- a/apps/api_web/test/api_web/canary_test.exs +++ b/apps/api_web/test/api_web/canary_test.exs @@ -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