Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Metabase
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Engineering Digital Service
Metabase
Commits
21b1fe69
Commit
21b1fe69
authored
9 years ago
by
Allen Gilliland
Browse files
Options
Downloads
Patches
Plain Diff
fixing up messages unit test.
parent
e02109dc
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
test/metabase/email/messages_test.clj
+9
-8
9 additions, 8 deletions
test/metabase/email/messages_test.clj
test/metabase/test_setup.clj
+3
-0
3 additions, 0 deletions
test/metabase/test_setup.clj
with
12 additions
and
8 deletions
test/metabase/email/messages_test.clj
+
9
−
8
View file @
21b1fe69
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
test/metabase/test_setup.clj
+
3
−
0
View file @
21b1fe69
...
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment