X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/3a76b55556740564b8cfb44c7e430975cca6bf96..55e5a470d6430d2026b94892112be6d985bcef09:/services/api/test/unit/user_notifier_test.rb diff --git a/services/api/test/unit/user_notifier_test.rb b/services/api/test/unit/user_notifier_test.rb index 89d10c52ac..f409d231f1 100644 --- a/services/api/test/unit/user_notifier_test.rb +++ b/services/api/test/unit/user_notifier_test.rb @@ -1,5 +1,9 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + require 'test_helper' - + class UserNotifierTest < ActionMailer::TestCase # Send the email, then test that it got queued @@ -8,16 +12,14 @@ class UserNotifierTest < ActionMailer::TestCase email = UserNotifier.account_is_setup user assert_not_nil email - + # Test the body of the sent email contains what we expect it to - assert_equal Rails.configuration.user_notifier_email_from, email.from.first + assert_equal Rails.configuration.Users.UserNotifierEmailFrom, email.from.first assert_equal user.email, email.to.first - assert_equal 'Welcome to Curoverse', email.subject - assert (email.body.to_s.include? 'Your Arvados account has been set up'), - 'Expected Your Arvados account has been set up in email body' - assert (email.body.to_s.include? user.email), - 'Expected user email in email body' - assert (email.body.to_s.include? Rails.configuration.workbench_address), + assert_equal 'Welcome to Arvados - shell account enabled', email.subject + assert (email.body.to_s.include? 'Your Arvados shell account has been set up'), + 'Expected Your Arvados shell account has been set up in email body' + assert (email.body.to_s.include? Rails.configuration.Services.Workbench1.ExternalURL.to_s), 'Expected workbench url in email body' end