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

pulibrary / pdc_describe / 00dac745-55d3-4397-95bf-de4f70881e93

pending completion
00dac745-55d3-4397-95bf-de4f70881e93

Pull #995

circleci

Hector Correa
Add tests for new logic
Pull Request #995: Handles external user ids

8 of 8 new or added lines in 1 file covered. (100.0%)

936 of 1902 relevant lines covered (49.21%)

9.91 hits per line

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

72.73
/app/models/collection_option.rb
1
# frozen_string_literal: true
2
class CollectionOption < ApplicationRecord
1✔
3
  EMAIL_MESSAGES = 0
1✔
4

5
  belongs_to :collection
1✔
6
  belongs_to :user
1✔
7

8
  enum option_type: { email_messages: 0 }
1✔
9

10
  # Provides a human-readable label for the type of the option
11
  # @note This should perhaps in the future parse from a YAML config. file
12
  # @return [String] the label
13
  def self.option_type_labels
1✔
14
    {
×
15
      email_messages: "E-mail messages for Collection notifications"
16
    }
17
  end
18

19
  # Finds the label for the option type value set for a given Model
20
  # @param [Integer] value the option type value
21
  # @return [String] the label
22
  def self.find_option_type_label(value)
1✔
23
    option_type_labels.fetch(value.to_sym, nil)
×
24
  end
25

26
  # Finds the label for the option type
27
  # @return [String] the label
28
  def option_type_label
1✔
29
    self.class.find_option_type_label(option_type)
×
30
  end
31
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

© 2025 Coveralls, Inc