1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: AGPL-3.0
7 class UserNotifierTest < ActionMailer::TestCase
9 # Send the email, then test that it got queued
10 test "account is setup" do
12 email = UserNotifier.account_is_setup user
16 # Test the body of the sent email contains what we expect it to
17 assert_equal Rails.configuration.Users.UserNotifierEmailFrom, email.from.first
18 assert_equal user.email, email.to.first
19 assert_equal 'Welcome to Arvados - shell account enabled', email.subject
20 assert (email.body.to_s.include? 'Your Arvados shell account has been set up'),
21 'Expected Your Arvados shell account has been set up in email body'
22 assert (email.body.to_s.include? Rails.configuration.Services.Workbench1.ExternalURL.to_s),
23 'Expected workbench url in email body'