From 6fa125538861a8a2cbf30b0d2104e4d32c91ae65 Mon Sep 17 00:00:00 2001 From: Budmin Date: Sat, 13 Dec 2025 13:19:21 -0500 Subject: [PATCH 01/12] disabled devise reconfirmable setting --- app/views/volunteers/edit.html.erb | 2 +- config/initializers/devise.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/volunteers/edit.html.erb b/app/views/volunteers/edit.html.erb index f99011702a..4b91c646ad 100644 --- a/app/views/volunteers/edit.html.erb +++ b/app/views/volunteers/edit.html.erb @@ -30,7 +30,7 @@ type: "submit", class: "main-btn primary-btn btn-hover btn-sm my-1" ) do %> - Submit + Update <% end %> <% end %> diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index c98e2c0538..1a1e2461c0 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -197,7 +197,7 @@ # initial account confirmation) to be applied. Requires additional unconfirmed_email # db field (see migrations). Until confirmed, new email is stored in # unconfirmed_email column, and copied to email column on successful confirmation. - config.reconfirmable = true + config.reconfirmable = false # Defines which key will be used when confirming an account # config.confirmation_keys = [:email] From d3e41c7e558c08d7701b963aaf241a6e84dbfc3c Mon Sep 17 00:00:00 2001 From: Budmin Date: Sun, 21 Dec 2025 23:59:24 -0500 Subject: [PATCH 02/12] email confirmation is only skipped when updating volunteers --- app/controllers/volunteers_controller.rb | 3 +++ config/initializers/devise.rb | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/controllers/volunteers_controller.rb b/app/controllers/volunteers_controller.rb index 1cb691e115..bc931d59a6 100644 --- a/app/controllers/volunteers_controller.rb +++ b/app/controllers/volunteers_controller.rb @@ -61,6 +61,9 @@ def edit def update authorize @volunteer + + @volunteer.skip_reconfirmation! + if @volunteer.update(update_volunteer_params) notice = check_unconfirmed_email_notice(@volunteer) diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index 1a1e2461c0..c98e2c0538 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -197,7 +197,7 @@ # initial account confirmation) to be applied. Requires additional unconfirmed_email # db field (see migrations). Until confirmed, new email is stored in # unconfirmed_email column, and copied to email column on successful confirmation. - config.reconfirmable = false + config.reconfirmable = true # Defines which key will be used when confirming an account # config.confirmation_keys = [:email] From 57eeec6f986c99b6189b5df8ec3abc5a4807ad09 Mon Sep 17 00:00:00 2001 From: Budmin Date: Mon, 22 Dec 2025 00:00:06 -0500 Subject: [PATCH 03/12] update to tests --- spec/requests/volunteers_spec.rb | 17 ++++---- spec/system/volunteers/edit_spec.rb | 60 ++++++++++------------------- 2 files changed, 30 insertions(+), 47 deletions(-) diff --git a/spec/requests/volunteers_spec.rb b/spec/requests/volunteers_spec.rb index a1586e7eb8..ad1923390d 100644 --- a/spec/requests/volunteers_spec.rb +++ b/spec/requests/volunteers_spec.rb @@ -239,18 +239,21 @@ expect(volunteer.phone_number).to eq "15463457898" end - it "sends the volunteer a confirmation email upon email change" do + it "updates the volunteer email without sending a confirmation email" do + old_email = volunteer.email + new_email = "newemail@example.com" + patch volunteer_path(volunteer), params: { - volunteer: {email: "newemail@gmail.com"} + volunteer: {email: new_email} } expect(response).to have_http_status(:redirect) volunteer.reload - expect(volunteer.unconfirmed_email).to eq("newemail@gmail.com") - expect(ActionMailer::Base.deliveries.count).to eq(1) - expect(ActionMailer::Base.deliveries.first).to be_a(Mail::Message) - expect(ActionMailer::Base.deliveries.first.body.encoded) - .to match("You can confirm your account email through the link below:") + + expect(volunteer.email).to eq(new_email) + expect(volunteer.old_emails).to eq([old_email]) + expect(volunteer.unconfirmed_email).to eq(nil) + end end diff --git a/spec/system/volunteers/edit_spec.rb b/spec/system/volunteers/edit_spec.rb index 5cc016aa7c..7df2873ea0 100644 --- a/spec/system/volunteers/edit_spec.rb +++ b/spec/system/volunteers/edit_spec.rb @@ -14,7 +14,7 @@ fill_in "volunteer_display_name", with: "Kamisato Ayato" fill_in "volunteer_phone_number", with: "+14163248967" fill_in "volunteer_date_of_birth", with: Date.new(1998, 7, 1) - click_on "Submit" + click_on "Update" expect(page).to have_text "Volunteer was successfully updated." end @@ -31,7 +31,7 @@ visit edit_volunteer_path(volunteer) fill_in "volunteer_phone_number", with: "+141632489" - click_on "Submit" + click_on "Update" expect(page).to have_text "Phone number must be 10 digits or 12 digits including country code (+1)" end @@ -44,7 +44,7 @@ visit edit_volunteer_path(volunteer) fill_in "volunteer_phone_number", with: "+141632180923" - click_on "Submit" + click_on "Update" expect(page).to have_text "Phone number must be 10 digits or 12 digits including country code (+1)" end @@ -58,7 +58,7 @@ visit edit_volunteer_path(volunteer) fill_in "volunteer_phone_number", with: "+141632u809o" - click_on "Submit" + click_on "Update" expect(page).to have_text "Phone number must be 10 digits or 12 digits including country code (+1)" end @@ -72,7 +72,7 @@ visit edit_volunteer_path(volunteer) fill_in "volunteer_phone_number", with: "+24163218092" - click_on "Submit" + click_on "Update" expect(page).to have_text "Phone number must be 10 digits or 12 digits including country code (+1)" end @@ -86,7 +86,7 @@ visit edit_volunteer_path(volunteer) fill_in "volunteer_date_of_birth", with: 5.days.from_now - click_on "Submit" + click_on "Update" expect(page).to have_text "Date of birth must be in the past." end @@ -104,7 +104,7 @@ fill_in "volunteer_display_name", with: "Kamisato Ayato" fill_in "volunteer_email", with: admin.email fill_in "volunteer_display_name", with: "Mickey Mouse" - click_on "Submit" + click_on "Update" expect(page).to have_text "already been taken" end @@ -120,7 +120,7 @@ fill_in "volunteer_email", with: "" fill_in "volunteer_display_name", with: "" - click_on "Submit" + click_on "Update" expect(page).to have_text "can't be blank" end @@ -129,48 +129,28 @@ describe "updating a volunteer's email" do context "with a valid email" do - it "sends volunteer a confirmation email and does not change the displayed email" do - organization = create(:casa_org) + it "updates volunteer email without sending a confirmaiton email" do + organization =create(:casa_org) admin = create(:casa_admin, casa_org: organization) volunteer = create(:volunteer, :with_assigned_supervisor, casa_org: organization) - old_email = volunteer.email - - sign_in admin - visit edit_volunteer_path(volunteer) - - fill_in "Email", with: "newemail@example.com" - click_on "Submit" - volunteer.reload - - expect(ActionMailer::Base.deliveries.count).to eq(1) - expect(ActionMailer::Base.deliveries.first).to be_a(Mail::Message) - expect(ActionMailer::Base.deliveries.first.body.encoded) - .to match("You can confirm your account email through the link below:") - - expect(page).to have_text "Volunteer was successfully updated. Confirmation Email Sent." - expect(page).to have_field("Email", with: old_email) - expect(volunteer.unconfirmed_email).to eq("newemail@example.com") - end - it "succesfully displays the new email once the user confirms" do - organization = create(:casa_org) - admin = create(:casa_admin, casa_org: organization) - volunteer = create(:volunteer, :with_assigned_supervisor, casa_org: organization) old_email = volunteer.email + new_email = "newemail@example.com" sign_in admin visit edit_volunteer_path(volunteer) - fill_in "Email", with: "newemail@example.com" - click_on "Submit" - volunteer.reload - volunteer.confirm + fill_in "Email", with: new_email + click_on "Update" - visit edit_volunteer_path(volunteer) + volunteer.reload - expect(page).to have_field("Email", with: "newemail@example.com") - expect(page).not_to have_field("Email", with: old_email) + expect(page).to have_text "Volunteer was successfully updated." + expect(page).to have_field("Email", with: new_email) + expect(volunteer.email).to eq(new_email) expect(volunteer.old_emails).to eq([old_email]) + expect(volunteer.unconfirmed_email).to eq(nil) + end end end @@ -734,7 +714,7 @@ visit edit_volunteer_path(volunteer) fill_in "volunteer_address_attributes_content", with: "123 Main St" - click_on "Submit" + click_on "Update" expect(page).to have_text "Volunteer was successfully updated." expect(page).to have_selector("input[value='123 Main St']") end From f0005f08950eaa9afae8b479bac889a337934f44 Mon Sep 17 00:00:00 2001 From: Budmin Date: Mon, 22 Dec 2025 00:20:38 -0500 Subject: [PATCH 04/12] linting fixes --- spec/requests/volunteers_spec.rb | 1 - spec/system/volunteers/edit_spec.rb | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/spec/requests/volunteers_spec.rb b/spec/requests/volunteers_spec.rb index ad1923390d..4159b925d2 100644 --- a/spec/requests/volunteers_spec.rb +++ b/spec/requests/volunteers_spec.rb @@ -253,7 +253,6 @@ expect(volunteer.email).to eq(new_email) expect(volunteer.old_emails).to eq([old_email]) expect(volunteer.unconfirmed_email).to eq(nil) - end end diff --git a/spec/system/volunteers/edit_spec.rb b/spec/system/volunteers/edit_spec.rb index 7df2873ea0..33777935c7 100644 --- a/spec/system/volunteers/edit_spec.rb +++ b/spec/system/volunteers/edit_spec.rb @@ -130,7 +130,7 @@ describe "updating a volunteer's email" do context "with a valid email" do it "updates volunteer email without sending a confirmaiton email" do - organization =create(:casa_org) + organization = create(:casa_org) admin = create(:casa_admin, casa_org: organization) volunteer = create(:volunteer, :with_assigned_supervisor, casa_org: organization) @@ -150,7 +150,6 @@ expect(volunteer.email).to eq(new_email) expect(volunteer.old_emails).to eq([old_email]) expect(volunteer.unconfirmed_email).to eq(nil) - end end end From bf4d85a92f4467d0b7b59e37b35fe2baffef232e Mon Sep 17 00:00:00 2001 From: compwron Date: Mon, 29 Dec 2025 12:47:43 -0800 Subject: [PATCH 05/12] fix spelling error Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- spec/system/volunteers/edit_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/system/volunteers/edit_spec.rb b/spec/system/volunteers/edit_spec.rb index 33777935c7..57fe29bd16 100644 --- a/spec/system/volunteers/edit_spec.rb +++ b/spec/system/volunteers/edit_spec.rb @@ -129,7 +129,7 @@ describe "updating a volunteer's email" do context "with a valid email" do - it "updates volunteer email without sending a confirmaiton email" do + it "updates volunteer email without sending a confirmation email" do organization = create(:casa_org) admin = create(:casa_admin, casa_org: organization) volunteer = create(:volunteer, :with_assigned_supervisor, casa_org: organization) From ae6418f65eb5237894c69f57a8a8c54316532f69 Mon Sep 17 00:00:00 2001 From: Budmin Date: Sat, 13 Dec 2025 13:19:21 -0500 Subject: [PATCH 06/12] disabled devise reconfirmable setting --- app/views/volunteers/edit.html.erb | 2 +- config/initializers/devise.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/volunteers/edit.html.erb b/app/views/volunteers/edit.html.erb index f99011702a..4b91c646ad 100644 --- a/app/views/volunteers/edit.html.erb +++ b/app/views/volunteers/edit.html.erb @@ -30,7 +30,7 @@ type: "submit", class: "main-btn primary-btn btn-hover btn-sm my-1" ) do %> - Submit + Update <% end %> <% end %> diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index c98e2c0538..1a1e2461c0 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -197,7 +197,7 @@ # initial account confirmation) to be applied. Requires additional unconfirmed_email # db field (see migrations). Until confirmed, new email is stored in # unconfirmed_email column, and copied to email column on successful confirmation. - config.reconfirmable = true + config.reconfirmable = false # Defines which key will be used when confirming an account # config.confirmation_keys = [:email] From 5581bce467f169f5722257b9cf753a8acbfdd4e7 Mon Sep 17 00:00:00 2001 From: Budmin Date: Sun, 21 Dec 2025 23:59:24 -0500 Subject: [PATCH 07/12] email confirmation is only skipped when updating volunteers --- app/controllers/volunteers_controller.rb | 3 +++ config/initializers/devise.rb | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/controllers/volunteers_controller.rb b/app/controllers/volunteers_controller.rb index 0573c63b64..a773b2b6c3 100644 --- a/app/controllers/volunteers_controller.rb +++ b/app/controllers/volunteers_controller.rb @@ -61,6 +61,9 @@ def edit def update authorize @volunteer + + @volunteer.skip_reconfirmation! + if @volunteer.update(update_volunteer_params) notice = check_unconfirmed_email_notice(@volunteer) diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index 1a1e2461c0..c98e2c0538 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -197,7 +197,7 @@ # initial account confirmation) to be applied. Requires additional unconfirmed_email # db field (see migrations). Until confirmed, new email is stored in # unconfirmed_email column, and copied to email column on successful confirmation. - config.reconfirmable = false + config.reconfirmable = true # Defines which key will be used when confirming an account # config.confirmation_keys = [:email] From 57ba5a51fbb562106ec39b3e468afc13ae97bdb8 Mon Sep 17 00:00:00 2001 From: Andrew Garvin Date: Wed, 4 Mar 2026 23:17:26 -0500 Subject: [PATCH 08/12] update to tests --- spec/requests/volunteers_spec.rb | 16 ++++---- spec/system/volunteers/edit_spec.rb | 60 ++++++++++------------------- 2 files changed, 29 insertions(+), 47 deletions(-) diff --git a/spec/requests/volunteers_spec.rb b/spec/requests/volunteers_spec.rb index 8cda127893..2e994f7923 100644 --- a/spec/requests/volunteers_spec.rb +++ b/spec/requests/volunteers_spec.rb @@ -239,18 +239,20 @@ expect(volunteer.phone_number).to eq "15463457898" end - it "sends the volunteer a confirmation email upon email change" do + it "updates the volunteer email without sending a confirmation email" do + old_email = volunteer.email + new_email = "newemail@example.com" + patch volunteer_path(volunteer), params: { - volunteer: {email: "newemail@gmail.com"} + volunteer: {email: new_email} } expect(response).to have_http_status(:redirect) volunteer.reload - expect(volunteer.unconfirmed_email).to eq("newemail@gmail.com") - expect(ActionMailer::Base.deliveries.count).to eq(1) - expect(ActionMailer::Base.deliveries.first).to be_a(Mail::Message) - expect(ActionMailer::Base.deliveries.first.body.encoded) - .to match("Click here to confirm your email") + expect(volunteer.email).to eq(new_email) + expect(volunteer.old_emails).to eq([old_email]) + expect(volunteer.unconfirmed_email).to eq(nil) + end end diff --git a/spec/system/volunteers/edit_spec.rb b/spec/system/volunteers/edit_spec.rb index bb2b6c79be..7df2873ea0 100644 --- a/spec/system/volunteers/edit_spec.rb +++ b/spec/system/volunteers/edit_spec.rb @@ -14,7 +14,7 @@ fill_in "volunteer_display_name", with: "Kamisato Ayato" fill_in "volunteer_phone_number", with: "+14163248967" fill_in "volunteer_date_of_birth", with: Date.new(1998, 7, 1) - click_on "Submit" + click_on "Update" expect(page).to have_text "Volunteer was successfully updated." end @@ -31,7 +31,7 @@ visit edit_volunteer_path(volunteer) fill_in "volunteer_phone_number", with: "+141632489" - click_on "Submit" + click_on "Update" expect(page).to have_text "Phone number must be 10 digits or 12 digits including country code (+1)" end @@ -44,7 +44,7 @@ visit edit_volunteer_path(volunteer) fill_in "volunteer_phone_number", with: "+141632180923" - click_on "Submit" + click_on "Update" expect(page).to have_text "Phone number must be 10 digits or 12 digits including country code (+1)" end @@ -58,7 +58,7 @@ visit edit_volunteer_path(volunteer) fill_in "volunteer_phone_number", with: "+141632u809o" - click_on "Submit" + click_on "Update" expect(page).to have_text "Phone number must be 10 digits or 12 digits including country code (+1)" end @@ -72,7 +72,7 @@ visit edit_volunteer_path(volunteer) fill_in "volunteer_phone_number", with: "+24163218092" - click_on "Submit" + click_on "Update" expect(page).to have_text "Phone number must be 10 digits or 12 digits including country code (+1)" end @@ -86,7 +86,7 @@ visit edit_volunteer_path(volunteer) fill_in "volunteer_date_of_birth", with: 5.days.from_now - click_on "Submit" + click_on "Update" expect(page).to have_text "Date of birth must be in the past." end @@ -104,7 +104,7 @@ fill_in "volunteer_display_name", with: "Kamisato Ayato" fill_in "volunteer_email", with: admin.email fill_in "volunteer_display_name", with: "Mickey Mouse" - click_on "Submit" + click_on "Update" expect(page).to have_text "already been taken" end @@ -120,7 +120,7 @@ fill_in "volunteer_email", with: "" fill_in "volunteer_display_name", with: "" - click_on "Submit" + click_on "Update" expect(page).to have_text "can't be blank" end @@ -129,48 +129,28 @@ describe "updating a volunteer's email" do context "with a valid email" do - it "sends volunteer a confirmation email and does not change the displayed email" do - organization = create(:casa_org) + it "updates volunteer email without sending a confirmaiton email" do + organization =create(:casa_org) admin = create(:casa_admin, casa_org: organization) volunteer = create(:volunteer, :with_assigned_supervisor, casa_org: organization) - old_email = volunteer.email - - sign_in admin - visit edit_volunteer_path(volunteer) - - fill_in "Email", with: "newemail@example.com" - click_on "Submit" - volunteer.reload - - expect(ActionMailer::Base.deliveries.count).to eq(1) - expect(ActionMailer::Base.deliveries.first).to be_a(Mail::Message) - expect(ActionMailer::Base.deliveries.first.body.encoded) - .to match("Click here to confirm your email") - - expect(page).to have_text "Volunteer was successfully updated. Confirmation Email Sent." - expect(page).to have_field("Email", with: old_email) - expect(volunteer.unconfirmed_email).to eq("newemail@example.com") - end - it "succesfully displays the new email once the user confirms" do - organization = create(:casa_org) - admin = create(:casa_admin, casa_org: organization) - volunteer = create(:volunteer, :with_assigned_supervisor, casa_org: organization) old_email = volunteer.email + new_email = "newemail@example.com" sign_in admin visit edit_volunteer_path(volunteer) - fill_in "Email", with: "newemail@example.com" - click_on "Submit" - volunteer.reload - volunteer.confirm + fill_in "Email", with: new_email + click_on "Update" - visit edit_volunteer_path(volunteer) + volunteer.reload - expect(page).to have_field("Email", with: "newemail@example.com") - expect(page).not_to have_field("Email", with: old_email) + expect(page).to have_text "Volunteer was successfully updated." + expect(page).to have_field("Email", with: new_email) + expect(volunteer.email).to eq(new_email) expect(volunteer.old_emails).to eq([old_email]) + expect(volunteer.unconfirmed_email).to eq(nil) + end end end @@ -734,7 +714,7 @@ visit edit_volunteer_path(volunteer) fill_in "volunteer_address_attributes_content", with: "123 Main St" - click_on "Submit" + click_on "Update" expect(page).to have_text "Volunteer was successfully updated." expect(page).to have_selector("input[value='123 Main St']") end From 18473a97ac29f07a2eadacd1704fc28cf63eafc6 Mon Sep 17 00:00:00 2001 From: Budmin Date: Mon, 22 Dec 2025 00:20:38 -0500 Subject: [PATCH 09/12] linting fixes --- spec/requests/volunteers_spec.rb | 1 - spec/system/volunteers/edit_spec.rb | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/spec/requests/volunteers_spec.rb b/spec/requests/volunteers_spec.rb index 2e994f7923..e8b9f4f648 100644 --- a/spec/requests/volunteers_spec.rb +++ b/spec/requests/volunteers_spec.rb @@ -252,7 +252,6 @@ expect(volunteer.email).to eq(new_email) expect(volunteer.old_emails).to eq([old_email]) expect(volunteer.unconfirmed_email).to eq(nil) - end end diff --git a/spec/system/volunteers/edit_spec.rb b/spec/system/volunteers/edit_spec.rb index 7df2873ea0..33777935c7 100644 --- a/spec/system/volunteers/edit_spec.rb +++ b/spec/system/volunteers/edit_spec.rb @@ -130,7 +130,7 @@ describe "updating a volunteer's email" do context "with a valid email" do it "updates volunteer email without sending a confirmaiton email" do - organization =create(:casa_org) + organization = create(:casa_org) admin = create(:casa_admin, casa_org: organization) volunteer = create(:volunteer, :with_assigned_supervisor, casa_org: organization) @@ -150,7 +150,6 @@ expect(volunteer.email).to eq(new_email) expect(volunteer.old_emails).to eq([old_email]) expect(volunteer.unconfirmed_email).to eq(nil) - end end end From 3adea8352e7c83d6dc4a22d4741126e5fd4be988 Mon Sep 17 00:00:00 2001 From: compwron Date: Mon, 29 Dec 2025 12:47:43 -0800 Subject: [PATCH 10/12] fix spelling error Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- spec/system/volunteers/edit_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/system/volunteers/edit_spec.rb b/spec/system/volunteers/edit_spec.rb index 33777935c7..57fe29bd16 100644 --- a/spec/system/volunteers/edit_spec.rb +++ b/spec/system/volunteers/edit_spec.rb @@ -129,7 +129,7 @@ describe "updating a volunteer's email" do context "with a valid email" do - it "updates volunteer email without sending a confirmaiton email" do + it "updates volunteer email without sending a confirmation email" do organization = create(:casa_org) admin = create(:casa_admin, casa_org: organization) volunteer = create(:volunteer, :with_assigned_supervisor, casa_org: organization) From 6a700fd841f05e5a2c589575783a3dd44157cbe2 Mon Sep 17 00:00:00 2001 From: compwron Date: Fri, 20 Mar 2026 12:34:09 -0700 Subject: [PATCH 11/12] Update app/controllers/volunteers_controller.rb Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- app/controllers/volunteers_controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/volunteers_controller.rb b/app/controllers/volunteers_controller.rb index a773b2b6c3..f2422cb27f 100644 --- a/app/controllers/volunteers_controller.rb +++ b/app/controllers/volunteers_controller.rb @@ -62,7 +62,9 @@ def edit def update authorize @volunteer - @volunteer.skip_reconfirmation! + if params.dig(:volunteer, :email).present? && params[:volunteer][:email] != @volunteer.email + @volunteer.skip_reconfirmation! + end if @volunteer.update(update_volunteer_params) notice = check_unconfirmed_email_notice(@volunteer) From d71c35c4cc2eefea230df21e0294f2d1c22f4d2d Mon Sep 17 00:00:00 2001 From: compwron Date: Thu, 26 Mar 2026 21:43:21 -0700 Subject: [PATCH 12/12] Update spec/system/volunteers/edit_spec.rb Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- spec/system/volunteers/edit_spec.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spec/system/volunteers/edit_spec.rb b/spec/system/volunteers/edit_spec.rb index 9845de49cb..8e4bc43f88 100644 --- a/spec/system/volunteers/edit_spec.rb +++ b/spec/system/volunteers/edit_spec.rb @@ -151,6 +151,10 @@ .to match("Click here to confirm your email") end + it "updates volunteer email and tracks old emails" do + organization = create(:casa_org) + admin = create(:casa_admin, casa_org: organization) + volunteer = create(:volunteer, :with_assigned_supervisor, casa_org: organization) old_email = volunteer.email new_email = "newemail@example.com"