From 83054757b914d5a8ab1c0c133261d436653a99e2 Mon Sep 17 00:00:00 2001 From: Thomas Leese Date: Tue, 9 Apr 2024 10:06:59 +0100 Subject: [PATCH] Ensure fake staff have change email permission This allows us to change the email address on applications in the test environment. --- app/lib/fake_data/staff_generator.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/lib/fake_data/staff_generator.rb b/app/lib/fake_data/staff_generator.rb index ae9814da07..bce90f938e 100644 --- a/app/lib/fake_data/staff_generator.rb +++ b/app/lib/fake_data/staff_generator.rb @@ -5,7 +5,12 @@ class FakeData::StaffGenerator def call RECORDS.each do |record| - Staff.create!(confirmed_at: Time.zone.now, password: "password", **record) + Staff.create!( + confirmed_at: Time.zone.now, + password: "password", + change_email_permission: true, + **record, + ) end end