diff --git a/app/models/user.rb b/app/models/user.rb index 760ea23af..68a1ef02a 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -9,6 +9,7 @@ class User < ApplicationRecord setting_type_other role_type role_type_other + early_years_experience registration_complete private_beta_registration_complete registration_complete_any? diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 8744c1898..490a090eb 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -132,6 +132,7 @@ private_beta_registration_complete: true, id: 1, local_authority: 'Watford Borough Council', + early_years_experience: 'na', module_time_to_completion: { alpha: 4, bravo: 2, @@ -143,6 +144,7 @@ local_authority: 'Leeds City Council', role_type: 'Trainer or lecturer', role_type_other: nil, + early_years_experience: '2-5', module_time_to_completion: { alpha: 1, bravo: 0, @@ -167,11 +169,11 @@ it 'exports formatted attributes as CSV' do expect(described_class.to_csv(batch_size: 2)).to eq <<~CSV - id,local_authority,setting_type,setting_type_other,role_type,role_type_other,registration_complete,private_beta_registration_complete,registration_complete_any?,registered_at,terms_and_conditions_agreed_at,gov_one?,module_1_time,module_2_time,module_3_time - 1,Watford Borough Council,,DfE,other,Developer,true,true,true,,2000-01-01 00:00:00,true,4,2,0 - 2,Leeds City Council,,DfE,Trainer or lecturer,,true,false,true,,2000-01-01 00:00:00,true,1,0, - 3,City of London,,DfE,other,Developer,true,false,true,2023-01-12 10:15:59,2000-01-01 00:00:00,true,3,, - 4,,,,,,false,false,false,,2000-01-01 00:00:00,true,,, + id,local_authority,setting_type,setting_type_other,role_type,role_type_other,early_years_experience,registration_complete,private_beta_registration_complete,registration_complete_any?,registered_at,terms_and_conditions_agreed_at,gov_one?,module_1_time,module_2_time,module_3_time + 1,Watford Borough Council,,DfE,other,Developer,na,true,true,true,,2000-01-01 00:00:00,true,4,2,0 + 2,Leeds City Council,,DfE,Trainer or lecturer,,2-5,true,false,true,,2000-01-01 00:00:00,true,1,0, + 3,City of London,,DfE,other,Developer,,true,false,true,2023-01-12 10:15:59,2000-01-01 00:00:00,true,3,, + 4,,,,,,,false,false,false,,2000-01-01 00:00:00,true,,, CSV end end