Change label for unknown race

pull/1/head
rebuilt 3 years ago
parent ba2da2e378
commit 53a08d41bf

@ -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,,

1 Race Qualtrics Code Race/Ethnicity Gender Qualtrics Code Sex/Gender
7 6 Prefer not to disclose
8 7 Prefer to self-describe
9 8 Middle Eastern
10 99 Unknown Race/Ethnicity Not Listed
11 100 Multiracial

@ -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,,

1 Race Qualtrics Code Race/Ethnicity Gender Qualtrics Code Sex/Gender
7 6 Prefer not to disclose
8 7 Prefer to self-describe
9 8 Middle Eastern
10 99 Unknown Race/Ethnicity Not Listed
11 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…
Cancel
Save