chore: add a test for categorizing sped values of 1 and 0 as 'Special Education' and 'Not Special Education'

rpp-main
Nelson Jovel 2 years ago
parent 4c258f6cb3
commit 0a27538747

@ -628,6 +628,13 @@ RSpec.describe SurveyItemValues, type: :model do
expect(values.sped).to eq "Special Education"
end
it 'translates "1" into "Special Education"' do
headers = ["Raw SpEd"]
row = { "Raw SpEd" => "1" }
values = SurveyItemValues.new(row:, headers:, survey_items:, schools:, academic_years:)
expect(values.sped).to eq "Special Education"
end
it 'translates "A" into "Special Education"' do
headers = ["Raw SpEd"]
row = { "Raw SpEd" => "A" }
@ -642,6 +649,13 @@ RSpec.describe SurveyItemValues, type: :model do
expect(values.sped).to eq "Not Special Education"
end
it 'translates "0" into "Not Special Education"' do
headers = ["Raw SpEd"]
row = { "Raw SpEd" => "0" }
values = SurveyItemValues.new(row:, headers:, survey_items:, schools:, academic_years:)
expect(values.sped).to eq "Not Special Education"
end
it 'translates "exited" into "Not Special Education"' do
headers = ["Raw SpEd"]
row = { "Raw SpEd" => "exited" }

Loading…
Cancel
Save