diff --git a/spec/factories/user.rb b/spec/factories/user.rb index 61af1d31d..029871cf5 100644 --- a/spec/factories/user.rb +++ b/spec/factories/user.rb @@ -2,12 +2,13 @@ FactoryBot.define do factory :user do transient do intro_clues { true } + slug { "#{firstname}.#{lastname}".parameterize } end - login { 'nicole.braun' } - firstname { 'Nicole' } - lastname { 'Braun' } - sequence(:email) { |n| "nicole.braun#{n}@zammad.org" } + login { slug } + firstname { Faker::Name.first_name } + lastname { Faker::Name.last_name } + sequence(:email) { |n| "#{slug}.#{n}@zammad.org" } password { nil } active { true } login_failed { 0 } diff --git a/spec/models/data_privacy_task_spec.rb b/spec/models/data_privacy_task_spec.rb index 18a19a200..ceec10b33 100644 --- a/spec/models/data_privacy_task_spec.rb +++ b/spec/models/data_privacy_task_spec.rb @@ -52,7 +52,7 @@ RSpec.describe DataPrivacyTask, type: :model do describe '#prepare_deletion_preview' do let(:organization) { create(:organization, name: 'Zammad GmbH') } - let(:user) { create(:customer, organization: organization, email: 'secret@example.com') } + let(:user) { create(:customer, firstname: 'Nicole', lastname: 'Braun', organization: organization, email: 'secret@example.com') } let(:task) { create(:data_privacy_task, deletable: user) } context 'when storing user data' do