From 98ff12e699f5ac91f8d84f115621de642794c5f5 Mon Sep 17 00:00:00 2001 From: Joaquin Date: Thu, 29 Aug 2024 11:28:03 -0300 Subject: [PATCH] Remove walkthrough_notifiers from use BoomNotifier Make accumulated_occurrences testing more clear --- lib/boom_notifier.ex | 4 ---- test/unit/notification_sender_test.exs | 2 ++ 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/boom_notifier.ex b/lib/boom_notifier.ex index 49b065d..88a0f77 100644 --- a/lib/boom_notifier.ex +++ b/lib/boom_notifier.ex @@ -28,10 +28,6 @@ defmodule BoomNotifier do fn notifier, options -> BoomNotifier.Api.validate_notifiers(notifier, options) end ) - def walkthrough_notifiers(callback) do - unquote(config) |> BoomNotifier.Api.walkthrough_notifiers(callback) - end - def notify_error(conn, error) do BoomNotifier.Api.notify_error(unquote(config), conn, error) end diff --git a/test/unit/notification_sender_test.exs b/test/unit/notification_sender_test.exs index 1d6c92b..46a3289 100644 --- a/test/unit/notification_sender_test.exs +++ b/test/unit/notification_sender_test.exs @@ -86,6 +86,8 @@ defmodule BoomNotifier.NotificationSenderTest do NotificationSender.trigger_notify(@settings_groupping, error_info) end + assert_receive({:notify_called, %{occurrences: %{accumulated_occurrences: 1}}}) + assert_receive({:notify_called, %{occurrences: %{accumulated_occurrences: 2}}}) assert_receive({:notify_called, %{occurrences: %{accumulated_occurrences: 4}}}) end end