Browse Source

lint fixes

pull/570/head
Dushan Despotovic 3 years ago
parent
commit
740ea35760
  1. 8
      app/models/case_log.rb
  2. 4
      spec/helpers/interruption_screen_helper_spec.rb

8
app/models/case_log.rb

@ -396,14 +396,14 @@ class CaseLog < ApplicationRecord
def plural_gender_for_person(person_num)
gender = public_send("sex#{person_num}".to_sym)
return unless gender
if gender == "M" || gender == "X"
return "men and non-binary people"
if %w[M X].include?(gender)
"men and non-binary people"
elsif gender == "F"
return "women"
"women"
end
end
private
PIO = Postcodes::IO.new

4
spec/helpers/interruption_screen_helper_spec.rb

@ -105,7 +105,7 @@ RSpec.describe InterruptionScreenHelper do
.to eq(I18n.t("test.title_text.no_argument"))
end
end
context "when title text has arguments" do
it "returns the correct title text" do
title_text = {
@ -121,6 +121,6 @@ RSpec.describe InterruptionScreenHelper do
expect(display_title_text(title_text, case_log))
.to eq(I18n.t("test.title_text.one_argument", ecstat1: case_log.form.get_question("ecstat1", case_log).answer_label(case_log).downcase))
end
end
end
end
end

Loading…
Cancel
Save