mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-07 21:48:16 -08:00
Change label for unknown race
This commit is contained in:
parent
ba2da2e378
commit
53a08d41bf
6 changed files with 6 additions and 6 deletions
|
|
@ -6,7 +6,7 @@ module Analyze
|
|||
class Unknown < GroupedBarColumnPresenter
|
||||
include Analyze::Graph::Column::ScoreForRace
|
||||
def label
|
||||
'Unknown'
|
||||
'Race/Ethnicity Not-Listed'
|
||||
end
|
||||
|
||||
def basis
|
||||
|
|
|
|||
|
|
@ -40,6 +40,6 @@ end
|
|||
|
||||
class UnknownRace
|
||||
def initialize(qualtrics_code:, designation:)
|
||||
Race.find_or_create_by!(qualtrics_code: 99, designation: 'Unknown')
|
||||
Race.find_or_create_by!(qualtrics_code: 99, designation: 'Race/Ethnicity Not Listed')
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -7,5 +7,5 @@ Race Qualtrics Code,Race/Ethnicity,Gender Qualtrics Code,Sex/Gender
|
|||
6,Prefer not to disclose,,
|
||||
7,Prefer to self-describe,,
|
||||
8,Middle Eastern,,
|
||||
99,Unknown,,
|
||||
99,Race/Ethnicity Not Listed,,
|
||||
100,Multiracial,,
|
||||
|
|
|
|||
|
2
spec/fixtures/sample_demographics.csv
vendored
2
spec/fixtures/sample_demographics.csv
vendored
|
|
@ -7,5 +7,5 @@ Race Qualtrics Code,Race/Ethnicity,Gender Qualtrics Code,Sex/Gender
|
|||
6,Prefer not to disclose,,
|
||||
7,Prefer to self-describe,,
|
||||
8,Middle Eastern,,
|
||||
99,Unknown,,
|
||||
99,Race/Ethnicity Not Listed,,
|
||||
100,Multiracial,,
|
||||
|
|
|
|||
|
|
|
@ -4,7 +4,7 @@ describe DemographicLoader do
|
|||
let(:filepath) { 'spec/fixtures/sample_demographics.csv' }
|
||||
let(:race_codes) do
|
||||
{ 'American Indian or Alaskan Native' => 1, 'Asian or Pacific Islander' => 2, 'Black or African American' => 3,
|
||||
'Hispanic or Latinx' => 4, 'White or Caucasian' => 5, 'Unknown' => 99, 'Middle Eastern' => 8, 'Multiracial' => 100 }
|
||||
'Hispanic or Latinx' => 4, 'White or Caucasian' => 5, 'Race/Ethnicity Not Listed' => 99, 'Middle Eastern' => 8, 'Multiracial' => 100 }
|
||||
end
|
||||
|
||||
let(:gender_codes) do
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ describe 'analyze/index' do
|
|||
|
||||
it 'displays a checkbox for each race designation' do
|
||||
race_slugs = %w[american-indian-or-alaskan-native asian-or-pacific-islander black-or-african-american
|
||||
hispanic-or-latinx middle-eastern multiracial unknown white-or-caucasian]
|
||||
hispanic-or-latinx middle-eastern multiracial race-ethnicity-not-listed white-or-caucasian]
|
||||
race_slugs.each do |slug|
|
||||
expect(subject).to have_css("//input[@type='checkbox'][@id='#{slug}']")
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue