diff --git a/Gemfile.lock b/Gemfile.lock index 2cb32e99b65..eea82ac68fa 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -321,8 +321,8 @@ GEM factory_bot_rails (6.4.3) factory_bot (~> 6.4) railties (>= 5.0.0) - faker (2.19.0) - i18n (>= 1.6, < 2) + faker (3.4.2) + i18n (>= 1.8.11, < 2) faraday (2.10.0) faraday-net_http (>= 2.0, < 3.2) logger diff --git a/spec/controllers/users/email_confirmations_controller_spec.rb b/spec/controllers/users/email_confirmations_controller_spec.rb index b6495043c2b..8c984d65584 100644 --- a/spec/controllers/users/email_confirmations_controller_spec.rb +++ b/spec/controllers/users/email_confirmations_controller_spec.rb @@ -5,7 +5,7 @@ describe 'Valid email confirmation tokens' do it 'tracks a valid email confirmation token event' do user = create(:user) - new_email = Faker::Internet.safe_email + new_email = Faker::Internet.email expect(PushNotification::HttpPush).to receive(:deliver).once. with(PushNotification::EmailChangedEvent.new( @@ -27,7 +27,7 @@ it 'rejects an otherwise valid token for unconfirmed users' do user = create(:user, :unconfirmed, email_addresses: []) - new_email = Faker::Internet.safe_email + new_email = Faker::Internet.email add_email_form = AddUserEmailForm.new add_email_form.submit(user, email: new_email) @@ -41,7 +41,7 @@ it 'rejects expired tokens' do user = create(:user) - new_email = Faker::Internet.safe_email + new_email = Faker::Internet.email add_email_form = AddUserEmailForm.new add_email_form.submit(user, email: new_email) diff --git a/spec/controllers/users/emails_controller_spec.rb b/spec/controllers/users/emails_controller_spec.rb index 05bb2201d48..2bc857706c5 100644 --- a/spec/controllers/users/emails_controller_spec.rb +++ b/spec/controllers/users/emails_controller_spec.rb @@ -30,7 +30,7 @@ stub_sign_in(user) while EmailPolicy.new(user).can_add_email? - email = Faker::Internet.safe_email + email = Faker::Internet.email user.email_addresses.create(email: email, confirmed_at: Time.zone.now) end end @@ -53,7 +53,7 @@ context 'valid email exists in session' do it 'sends email' do - email = Faker::Internet.safe_email + email = Faker::Internet.email post :add, params: { user: { email: email } } diff --git a/spec/controllers/users/sessions_controller_spec.rb b/spec/controllers/users/sessions_controller_spec.rb index 6d1588d5bcb..be407001213 100644 --- a/spec/controllers/users/sessions_controller_spec.rb +++ b/spec/controllers/users/sessions_controller_spec.rb @@ -906,7 +906,7 @@ render_views it 'does not prefill the form' do - email = Faker::Internet.safe_email + email = Faker::Internet.email password = SecureRandom.uuid get :new, params: { user: { email: email, password: password } } diff --git a/spec/factories/email_addresses.rb b/spec/factories/email_addresses.rb index 620d7b04cd4..975f2e8b883 100644 --- a/spec/factories/email_addresses.rb +++ b/spec/factories/email_addresses.rb @@ -4,7 +4,7 @@ factory :email_address do confirmed_at { Time.zone.now } confirmation_sent_at { Time.zone.now - 5.minutes } - email { Faker::Internet.safe_email } + email { Faker::Internet.email } user { association :user } trait :unconfirmed do diff --git a/spec/factories/users.rb b/spec/factories/users.rb index 4659097e929..4e0cec5aadd 100644 --- a/spec/factories/users.rb +++ b/spec/factories/users.rb @@ -47,7 +47,7 @@ until user.email_addresses.many? user.email_addresses << build( :email_address, - email: Faker::Internet.safe_email, + email: Faker::Internet.email, confirmed_at: user.confirmed_at, user_id: -1, ) @@ -57,7 +57,7 @@ until user.email_addresses.many? user.email_addresses << build( :email_address, - email: Faker::Internet.safe_email, + email: Faker::Internet.email, confirmed_at: user.confirmed_at, user_id: -1, ) diff --git a/spec/features/users/sign_up_spec.rb b/spec/features/users/sign_up_spec.rb index b71f4ce0a78..b6fef7c4ab1 100644 --- a/spec/features/users/sign_up_spec.rb +++ b/spec/features/users/sign_up_spec.rb @@ -37,7 +37,7 @@ end context 'picking a preferred email language on signup' do - let(:email) { Faker::Internet.safe_email } + let(:email) { Faker::Internet.email } it 'allows a user to pick a language when entering email' do visit sign_up_email_path diff --git a/spec/services/push_notification/email_changed_event_spec.rb b/spec/services/push_notification/email_changed_event_spec.rb index 20bfd52fdab..c673a3e4015 100644 --- a/spec/services/push_notification/email_changed_event_spec.rb +++ b/spec/services/push_notification/email_changed_event_spec.rb @@ -9,7 +9,7 @@ end let(:user) { build(:user) } - let(:email) { Faker::Internet.safe_email } + let(:email) { Faker::Internet.email } describe '#event_type' do it 'is the RISC event type' do diff --git a/spec/services/push_notification/http_push_spec.rb b/spec/services/push_notification/http_push_spec.rb index 6a854c044b4..1cd1e71bb13 100644 --- a/spec/services/push_notification/http_push_spec.rb +++ b/spec/services/push_notification/http_push_spec.rb @@ -18,7 +18,7 @@ let(:event) do PushNotification::IdentifierRecycledEvent.new( user: user, - email: Faker::Internet.safe_email, + email: Faker::Internet.email, ) end let(:now) { Time.zone.now } diff --git a/spec/services/push_notification/identifier_recycled_event_spec.rb b/spec/services/push_notification/identifier_recycled_event_spec.rb index 548fbc57eea..a99664d4492 100644 --- a/spec/services/push_notification/identifier_recycled_event_spec.rb +++ b/spec/services/push_notification/identifier_recycled_event_spec.rb @@ -9,7 +9,7 @@ end let(:user) { build(:user) } - let(:email) { Faker::Internet.safe_email } + let(:email) { Faker::Internet.email } describe '#event_type' do it 'is the RISC event type' do diff --git a/spec/services/reset_user_password_spec.rb b/spec/services/reset_user_password_spec.rb index f7aafe5f929..f0017af9340 100644 --- a/spec/services/reset_user_password_spec.rb +++ b/spec/services/reset_user_password_spec.rb @@ -20,7 +20,7 @@ end it 'notifies the user via email to each of their confirmed email addresses' do - create(:email_address, user:, email: Faker::Internet.safe_email, confirmed_at: nil) + create(:email_address, user:, email: Faker::Internet.email, confirmed_at: nil) expect { call }. to(change { ActionMailer::Base.deliveries.count }.by(2)) diff --git a/spec/services/usps_in_person_proofing/proofer_spec.rb b/spec/services/usps_in_person_proofing/proofer_spec.rb index e8fe2c16a9a..a31e7fe7d88 100644 --- a/spec/services/usps_in_person_proofing/proofer_spec.rb +++ b/spec/services/usps_in_person_proofing/proofer_spec.rb @@ -95,7 +95,7 @@ def expect_facility_fields_to_be_present(facility) zip_code: Faker::Address.zip_code, first_name: Faker::Name.first_name, last_name: Faker::Name.last_name, - email: Faker::Internet.safe_email, + email: Faker::Internet.email, unique_id: '123456789', ) stub_request_token @@ -291,7 +291,7 @@ def expect_facility_fields_to_be_present(facility) zip_code: Faker::Address.zip_code, first_name: Faker::Name.first_name, last_name: Faker::Name.last_name, - email: Faker::Internet.safe_email, + email: Faker::Internet.email, unique_id: '123456789', ) end diff --git a/spec/support/features/session_helper.rb b/spec/support/features/session_helper.rb index d2ffb80101a..ea92023dd69 100644 --- a/spec/support/features/session_helper.rb +++ b/spec/support/features/session_helper.rb @@ -122,7 +122,7 @@ def fill_in_password_and_submit(password) end def sign_up - email = Faker::Internet.safe_email + email = Faker::Internet.email sign_up_with(email) confirm_last_user end