Maintenance: User factory randomizes names
This commit is contained in:
parent
e7b0486b5b
commit
9085ef3465
2 changed files with 6 additions and 5 deletions
|
@ -2,12 +2,13 @@ FactoryBot.define do
|
||||||
factory :user do
|
factory :user do
|
||||||
transient do
|
transient do
|
||||||
intro_clues { true }
|
intro_clues { true }
|
||||||
|
slug { "#{firstname}.#{lastname}".parameterize }
|
||||||
end
|
end
|
||||||
|
|
||||||
login { 'nicole.braun' }
|
login { slug }
|
||||||
firstname { 'Nicole' }
|
firstname { Faker::Name.first_name }
|
||||||
lastname { 'Braun' }
|
lastname { Faker::Name.last_name }
|
||||||
sequence(:email) { |n| "nicole.braun#{n}@zammad.org" }
|
sequence(:email) { |n| "#{slug}.#{n}@zammad.org" }
|
||||||
password { nil }
|
password { nil }
|
||||||
active { true }
|
active { true }
|
||||||
login_failed { 0 }
|
login_failed { 0 }
|
||||||
|
|
|
@ -52,7 +52,7 @@ RSpec.describe DataPrivacyTask, type: :model do
|
||||||
describe '#prepare_deletion_preview' do
|
describe '#prepare_deletion_preview' do
|
||||||
|
|
||||||
let(:organization) { create(:organization, name: 'Zammad GmbH') }
|
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) }
|
let(:task) { create(:data_privacy_task, deletable: user) }
|
||||||
|
|
||||||
context 'when storing user data' do
|
context 'when storing user data' do
|
||||||
|
|
Loading…
Reference in a new issue