Skip to content
Snippets Groups Projects
Commit 21b1fe69 authored by Allen Gilliland's avatar Allen Gilliland
Browse files

fixing up messages unit test.

parent e02109dc
Branches
Tags
No related merge requests found
......@@ -36,18 +36,19 @@
(email/email-smtp-password orig-password#))))))
;; new user email
;; NOTE: we are not validating the content of the email body namely because it's got randomized elements and thus
;; it would be extremely hard to have a predictable test that we can rely on
(expect
[{:from "notifications@metabase.com",
:to ["test@test.com"],
:subject "Your new Metabase account is all set up",
:body [{:type "text/html; charset=utf-8",
:content (str "<html><body><p>Welcome to Metabase test!</p>"
"<p>Your account is setup and ready to go, you just need to set a password so you can login. "
"Follow the link below to reset your account password.</p>"
"<p><a href=\"http://localhost/some/url\">http://localhost/some/url</a></p></body></html>")}]}]
:subject "You're invited to join Metabase Test's Metabase",
:body [{:type "text/html; charset=utf-8"}]}]
(with-fake-inbox
(send-new-user-email "test" "test@test.com" "http://localhost/some/url")
(@inbox "test@test.com")))
(send-new-user-email {:first_name "test" :email "test@test.com"}
{:first_name "invitor" :email "invited_by@test.com"}
"http://localhost/some/url")
(-> (@inbox "test@test.com")
(update-in [0 :body 0] dissoc :content))))
;; password reset email
(expect
......
......@@ -89,6 +89,9 @@
(log/info "Setting up test DB and running migrations...")
(db/setup-db :auto-migrate true)
;; add any global settings defaults
(metabase.models.setting/set :site-name "Metabase Test")
;; Load the test datasets
(load-test-datasets)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment