From de5afd5ca4bcca6230e1a20998c161c0b2aad59a Mon Sep 17 00:00:00 2001 From: aaronskiba <71047780+aaronskiba@users.noreply.github.com> Date: Tue, 30 Jan 2024 13:25:51 -0700 Subject: [PATCH] replace 'safe_email' with 'email' for Faker Prior to this commit, the following deprecation warning was appearing in the terminal: NOTE: Faker::Internet.safe_email is deprecated; use email instead. It will be removed on or after 2023-10. More here: https://github.com/faker-ruby/faker/pull/2733 --- spec/factories/orgs.rb | 2 +- spec/factories/users.rb | 2 +- spec/models/plan_spec.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/factories/orgs.rb b/spec/factories/orgs.rb index a9f15f74b5..88bc858b0b 100644 --- a/spec/factories/orgs.rb +++ b/spec/factories/orgs.rb @@ -40,7 +40,7 @@ region { Region.first || create(:region) } language { Language.default } is_other { false } - contact_email { Faker::Internet.safe_email } + contact_email { Faker::Internet.email } contact_name { Faker::Name.name } managed { true } trait :institution do diff --git a/spec/factories/users.rb b/spec/factories/users.rb index 765898e944..c91c756604 100644 --- a/spec/factories/users.rb +++ b/spec/factories/users.rb @@ -57,7 +57,7 @@ language { Language.default } firstname { Faker::Name.unique.first_name } surname { Faker::Name.unique.last_name } - email { Faker::Internet.unique.safe_email } + email { Faker::Internet.unique.email } password { 'password' } accept_terms { true } diff --git a/spec/models/plan_spec.rb b/spec/models/plan_spec.rb index 2d9ef05a8e..08bcca6f5b 100644 --- a/spec/models/plan_spec.rb +++ b/spec/models/plan_spec.rb @@ -592,7 +592,7 @@ context 'when org contact_email present' do before do - org.update!(contact_email: Faker::Internet.safe_email) + org.update!(contact_email: Faker::Internet.email) end it 'emails the admins' do