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

curationexperts / laevigata / 30f93d48-e4b2-44ea-965a-de964df4c66f

14 May 2025 04:41PM UTC coverage: 97.411%. Remained the same
30f93d48-e4b2-44ea-965a-de964df4c66f

push

circleci

mark-dce
Corrects spelling mistake

"Afer" --> "After"

2822 of 2897 relevant lines covered (97.41%)

52.19 hits per line

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

100.0
/app/validators/my_advisor_validator.rb
1
class MyAdvisorValidator < ActiveModel::Validator
4✔
2
  def validate(record)
4✔
3
    return unless current_tab?(record)
91✔
4
    ::Hyrax::EtdForm.my_advisor_terms.each do |field|
5✔
5
      next if field == :committee_members_attributes
10✔
6
      record.errors.add(field, "#{field} is required") if parsed_data(record)[field.to_s].blank?
5✔
7
    end
8
  end
9

10
  def parsed_data(record)
4✔
11
    return {} unless record.data
96✔
12
    JSON.parse(record.data)
70✔
13
  end
14

15
  def current_tab?(record)
4✔
16
    parsed_data(record)['currentTab'] == "My Advisor"
91✔
17
  end
18
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