Skip to content
Snippets Groups Projects
Unverified Commit b51d1788 authored by dpsutton's avatar dpsutton Committed by GitHub
Browse files

Fix flaky email tests (#19023)

Docstring for `regex-email-bodies` states:

> "Return messages in the fake inbox whose body matches the
regex(es). The body will be replaced by a map with the stringified regex
as it's key and a boolean indicated that the regex returned results."

But it does ont return messages in the fake inbox whose body matches any
of the regex. It returns them all regardless, with information if they
match or not. Simply correct this behavior to match the docstring

```clojure
{"rasta@metabase.com"
 ({:from "notifications@metabase.com",
   :to #{"rasta@metabase.com"},
   :subject "We've Noticed a New Metabase Login, Rasta",
   :body {"https://metabase.com/testmb" false, "has any results" false, "My question" false}}
  {:from "notifications@metabase.com",
   :to #{"rasta@metabase.com"},
   :subject "We've Noticed a New Metabase Login, Rasta",
   :body {"https://metabase.com/testmb" false, "has any results" false, "My question" false}}
  {:from "notifications@metabase.com",
   :to #{"rasta@metabase.com"},
   :subject "You set up an alert",
   :body {"https://metabase.com/testmb" true, "has any results" true, "My question" true}})}
```
parent 0480c2cc
No related branches found
No related tags found
No related merge requests found
Loading
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