mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-07 21:48:16 -08:00
chore: add a test for categorizing sped values of 1 and 0 as 'Special Education' and 'Not Special Education'
This commit is contained in:
parent
e34ff65e0e
commit
927fae1afd
1 changed files with 14 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue