mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-07 21:48:16 -08:00
ECP-201 Add an unknown categories to the parent survey SES filter
This commit is contained in:
parent
df96f08c12
commit
138c61e7f0
4 changed files with 34 additions and 6 deletions
|
|
@ -346,9 +346,6 @@ describe SurveyResponsesDataLoader do
|
|||
it "returns 0 when none of the rubrics meet the standard for higher advantage" do
|
||||
score = SocioEconomicCalculator.socio_economic_score(Education.new(designation: "No formal schooling completed"), Benefit.new(designation: "Yes"), [Employment.new(designation: "No full-time or part-time employment")])
|
||||
expect(score).to eq 0
|
||||
|
||||
score = SocioEconomicCalculator.socio_economic_score(Education.new(designation: "Unknown"), Benefit.new(designation: "Unknown"), [Employment.new(designation: "Unknown")])
|
||||
expect(score).to eq 0
|
||||
end
|
||||
|
||||
it "returns 1 when one of the rubrics meets the standard for higher advantage" do
|
||||
|
|
@ -368,6 +365,20 @@ describe SurveyResponsesDataLoader do
|
|||
score = SocioEconomicCalculator.socio_economic_score(Education.new(designation: "Associates Degree"), Benefit.new(designation: "No"), [Employment.new(designation: "One adult with full-time employment"), Employment.new(designation: "Two adults with full-time employment")])
|
||||
expect(score).to eq 3
|
||||
end
|
||||
|
||||
it "returns -1 when any aspect of the data is unknown" do
|
||||
score = SocioEconomicCalculator.socio_economic_score(Education.new(designation: "Associates Degree"), Benefit.new(designation: "Unknown"), [Employment.new(designation: "Two adults with full-time employment")])
|
||||
expect(score).to eq -1
|
||||
|
||||
score = SocioEconomicCalculator.socio_economic_score(Education.new(designation: "Associates Degree"), Benefit.new(designation: "No"), [Employment.new(designation: "Unknown")])
|
||||
expect(score).to eq -1
|
||||
|
||||
score = SocioEconomicCalculator.socio_economic_score(Education.new(designation: "Unknown"), Benefit.new(designation: "No"), [Employment.new(designation: "No full-time or part-time employment")])
|
||||
expect(score).to eq -1
|
||||
|
||||
score = SocioEconomicCalculator.socio_economic_score(Education.new(designation: "Unknown"), Benefit.new(designation: "No"), [])
|
||||
expect(score).to eq -1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue