From 943d97e171113bdf18bf1d01efed45e2a5c49748 Mon Sep 17 00:00:00 2001 From: cmaddox5 Date: Thu, 19 Dec 2024 10:59:43 -0500 Subject: [PATCH] Add back a test. --- apps/api_web/test/api_web/canary_test.exs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/apps/api_web/test/api_web/canary_test.exs b/apps/api_web/test/api_web/canary_test.exs index 06be1785d..d29b268de 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