• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

curationexperts / laevigata / a89c0ced-554e-4aeb-bbb1-66fb603498ae

05 May 2025 07:34PM UTC coverage: 93.347% (-1.6%) from 94.984%
a89c0ced-554e-4aeb-bbb1-66fb603498ae

Pull #2458

circleci

web-flow
Corrects spelling mistake

"Afer" --> "After"
Pull Request #2458: Corrects spelling mistake

2666 of 2856 relevant lines covered (93.35%)

42.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/app/validators/my_program_validator.rb
1
class MyProgramValidator < ActiveModel::Validator
3✔
2
  def validate(record)
3✔
3
    return unless current_tab?(record)
63✔
4
    fields_to_validate = ::Hyrax::EtdForm.my_program_terms - [:partnering_agency]
3✔
5
    fields_to_validate.each do |field|
3✔
6
      # TODO: confirm whether subfields are never required by Emory
7
      next if field == :subfield
12✔
8
      record.errors.add(field, "#{field} is required") if parsed_data(record)[field.to_s].blank?
9✔
9
    end
10
  end
11

12
  def parsed_data(record)
3✔
13
    return {} unless record.data
72✔
14
    JSON.parse(record.data)
58✔
15
  end
16

17
  def current_tab?(record)
3✔
18
    parsed_data(record)['currentTab'] == "My Program"
63✔
19
  end
20
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc