Skip to content
Snippets Groups Projects
Commit a3a9c8f1 authored by Ryan Senior's avatar Ryan Senior
Browse files

Add missing `with-expected-message` calls in alert-test

parent cae7ac32
No related branches found
No related tags found
No related merge requests found
...@@ -553,7 +553,8 @@ ...@@ -553,7 +553,8 @@
(with-alert-setup (with-alert-setup
[(recipient-emails ((user->client :rasta) :get 200 (format "alert/question/%d" card-id))) [(recipient-emails ((user->client :rasta) :get 200 (format "alert/question/%d" card-id)))
(do (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)))) (recipient-emails ((user->client :crowberto) :get 200 (format "alert/question/%d" card-id))))
(et/regex-email-bodies #"https://metabase.com/testmb" (et/regex-email-bodies #"https://metabase.com/testmb"
#"Foo")])) #"Foo")]))
...@@ -683,10 +684,11 @@ ...@@ -683,10 +684,11 @@
[1 nil 0 [1 nil 0
(rasta-deleted-email {})] (rasta-deleted-email {})]
(with-alert-setup (with-alert-setup
[(count ((user->client :rasta) :get 200 (format "alert/question/%d" card-id))) [(count ((user->client :rasta) :get 200 (format "alert/question/%d" card-id)))
((user->client :crowberto) :delete 204 (format "alert/%d" pulse-id)) (et/with-expected-messages 1
(count ((user->client :rasta) :get 200 (format "alert/question/%d" card-id))) ((user->client :crowberto) :delete 204 (format "alert/%d" pulse-id)))
(et/regex-email-bodies #"Crowberto Corv deleted an alert")])) (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 ;; A deleted alert should notify the creator and any recipients
(tt/expect-with-temp [Card [{card-id :id} (basic-alert-query)] (tt/expect-with-temp [Card [{card-id :id} (basic-alert-query)]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment