8784: Fix test for latest firefox.
[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 - shell account enabled', email.subject
16     assert (email.body.to_s.include? 'Your Arvados shell account has been set up'),
17         'Expected Your Arvados shell account has been set up in email body'
18     assert (email.body.to_s.include? Rails.configuration.workbench_address),
19         'Expected workbench url in email body'
20   end
21
22 end