From a3a9c8f19fde80f2858b97e858f60c1bcfc6a6d2 Mon Sep 17 00:00:00 2001 From: Ryan Senior <ryan@metabase.com> Date: Wed, 22 Nov 2017 13:46:47 -0600 Subject: [PATCH] Add missing `with-expected-message` calls in alert-test --- test/metabase/api/alert_test.clj | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/test/metabase/api/alert_test.clj b/test/metabase/api/alert_test.clj index a4c0d32c927..9f0095c6d41 100644 --- a/test/metabase/api/alert_test.clj +++ b/test/metabase/api/alert_test.clj @@ -553,7 +553,8 @@ (with-alert-setup [(recipient-emails ((user->client :rasta) :get 200 (format "alert/question/%d" card-id))) (do - ((user->client :rasta) :put 204 (format "alert/%d/unsubscribe" pulse-id)) + (et/with-expected-messages 1 + ((user->client :rasta) :put 204 (format "alert/%d/unsubscribe" pulse-id))) (recipient-emails ((user->client :crowberto) :get 200 (format "alert/question/%d" card-id)))) (et/regex-email-bodies #"https://metabase.com/testmb" #"Foo")])) @@ -683,10 +684,11 @@ [1 nil 0 (rasta-deleted-email {})] (with-alert-setup - [(count ((user->client :rasta) :get 200 (format "alert/question/%d" card-id))) - ((user->client :crowberto) :delete 204 (format "alert/%d" pulse-id)) - (count ((user->client :rasta) :get 200 (format "alert/question/%d" card-id))) - (et/regex-email-bodies #"Crowberto Corv deleted an alert")])) + [(count ((user->client :rasta) :get 200 (format "alert/question/%d" card-id))) + (et/with-expected-messages 1 + ((user->client :crowberto) :delete 204 (format "alert/%d" pulse-id))) + (count ((user->client :rasta) :get 200 (format "alert/question/%d" card-id))) + (et/regex-email-bodies #"Crowberto Corv deleted an alert")])) ;; A deleted alert should notify the creator and any recipients (tt/expect-with-temp [Card [{card-id :id} (basic-alert-query)] -- GitLab