Add 'apps/arv-web/' from commit 'f9732ad8460d013c2f28363655d0d1b91894dca5'
[arvados.git] / services / api / test / unit / user_notifier_test.rb
1 require 'test_helper'
2
3 class UserNotifierTest < ActionMailer::TestCase
4
5   # Send the email, then test that it got queued
6   test "account is setup" do
7     user = users :active
8     email = UserNotifier.account_is_setup user
9
10     assert_not_nil email
11
12     # Test the body of the sent email contains what we expect it to
13     assert_equal Rails.configuration.user_notifier_email_from, email.from.first
14     assert_equal user.email, email.to.first
15     assert_equal 'Welcome to Curoverse', email.subject
16     assert (email.body.to_s.include? 'Your Arvados account has been set up'),
17         'Expected Your Arvados account has been set up in email body'
18     assert (email.body.to_s.include? user.email),
19         'Expected user email in email body'
20     assert (email.body.to_s.include? Rails.configuration.workbench_address),
21         'Expected workbench url in email body'
22   end
23
24 end