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

pull/4/head
Nelson Jovel 2 years ago
parent e34ff65e0e
commit 927fae1afd

@ -628,6 +628,13 @@ RSpec.describe SurveyItemValues, type: :model do
expect(values.sped).to eq "Special Education" expect(values.sped).to eq "Special Education"
end 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 it 'translates "A" into "Special Education"' do
headers = ["Raw SpEd"] headers = ["Raw SpEd"]
row = { "Raw SpEd" => "A" } row = { "Raw SpEd" => "A" }
@ -642,6 +649,13 @@ RSpec.describe SurveyItemValues, type: :model do
expect(values.sped).to eq "Not Special Education" expect(values.sped).to eq "Not Special Education"
end 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 it 'translates "exited" into "Not Special Education"' do
headers = ["Raw SpEd"] headers = ["Raw SpEd"]
row = { "Raw SpEd" => "exited" } row = { "Raw SpEd" => "exited" }

Loading…
Cancel
Save