From 664119ddcf1931da04c69f58fc151a8876e80883 Mon Sep 17 00:00:00 2001 From: David Cook Date: Tue, 18 Feb 2025 16:15:04 +1100 Subject: [PATCH] Update test for multi-part email Now that it's a multi-part email, we have to select the html part for the test. Another option is to simply check mail.to_s, but this also includes mail headers so doesn't specifically test the body. --- spec/mailers/user_mailer_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/mailers/user_mailer_spec.rb b/spec/mailers/user_mailer_spec.rb index 1d1e80e507..7fb020f362 100644 --- a/spec/mailers/user_mailer_spec.rb +++ b/spec/mailers/user_mailer_spec.rb @@ -81,7 +81,7 @@ RSpec.describe Spree::UserMailer do context 'body includes' do it 'password reset url' do - expect(mail.body.raw_source).to include spree.edit_spree_user_password_url + expect(mail.html_part.body).to include spree.edit_spree_user_password_url end end