Skip to content

Commit

Permalink
Add early_years_experience to data export (#1179)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdavidhamilton authored May 14, 2024
1 parent eb4e155 commit 6fa53a3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down
12 changes: 7 additions & 5 deletions spec/models/user_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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
Expand Down

0 comments on commit 6fa53a3

Please sign in to comment.