chore: correct parsing for 'not sped' and 'lep not first year'

This commit is contained in:
Nelson Jovel 2024-06-26 12:02:22 -07:00
parent c5cb34c698
commit 3ecc68edd0
5 changed files with 91 additions and 4 deletions

View file

@ -579,6 +579,10 @@ RSpec.describe SurveyItemValues, type: :model do
row = { "Raw ELL" => "EL - Early Child. or PK" }
values = SurveyItemValues.new(row:, headers:, survey_items:, schools:)
expect(values.ell).to eq "ELL"
row = { "Raw ELL" => "LEP Not 1st Year" }
values = SurveyItemValues.new(row:, headers:, survey_items:, schools:)
expect(values.ell).to eq "ELL"
end
it 'translates "Does not Apply" into "Not ELL"' do
@ -680,6 +684,13 @@ RSpec.describe SurveyItemValues, type: :model do
expect(values.sped).to eq "Not Special Education"
end
it 'translates "not sped" into "Not Special Education' do
headers = ["Raw SpEd"]
row = { "Raw SpEd" => "Not SPED" }
values = SurveyItemValues.new(row:, headers:, survey_items:, schools:, academic_years:)
expect(values.sped).to eq "Not Special Education"
end
it 'translates NA into "Unknown"' do
headers = ["Raw SpEd"]
row = { "Raw SpEd" => "NA" }