Skip to content

IULRDC-93 DataCORE NewContentService unit tests#213

Open
rdlebeau wants to merge 2 commits intomainfrom
IULRDC-93_DataCORE_newcontentservice_unit_tests
Open

IULRDC-93 DataCORE NewContentService unit tests#213
rdlebeau wants to merge 2 commits intomainfrom
IULRDC-93_DataCORE_newcontentservice_unit_tests

Conversation

@rdlebeau
Copy link
Contributor

@rdlebeau rdlebeau commented Feb 9, 2026

Extracted methods:

  • apply_work
  • action_name
  • find_existing_collection
  • default_description
  • default_collection_resource_type
  • find_existing_work
  • default_methodology
  • default_work_resource_type
  • value_from_attr
  • attr_current_time

New methods:

  • log_verbose_msg

Removed redundant methods:

  • new_collection
  • new_file_set
  • new_data_set
  • diff_file_sets_from_files
  • update_collection_from_hash
  • find_or_create_user
  • update_file_sets_from_files

Added new parameter to method:

  • log_provenance_migrate

Removed redundant parameter from method:

  • diff_attr?
  • diff_attr_if_blank?
  • diff_attr_value
  • diff_file_set
  • diff_user_attr_if_blank?
  • diff_work
  • update_attr
  • update_attr_if_blank?
  • update_attr_value
  • update_work
  • update_file_set

In addition

line 681 - changed else to elsif on when checksum variable is blank because lack of algorithm field on checksum variable causes an error

line 788, 872, 2060 - corrected spelling on build_rights_liscense to build_rights_license

line 794 - explicitly checking for array instead of whether a value responds to '[]' because a string responds to '[]' - assuming we want the first string of an array of strings, not first letter of a string

line 943, 1098, 1300, 1395, 1815 - changed 'nil' to nil - assuming that 'nil' was incorrect

line 1134, 1868 - changed orignal_name to original_name (corrected spelling)

line 1334 - removed work.id from error message - no work.id in function

line 1722 - changed variable name from attr_name to hard-coded "attr_doi" - doi_mint function has no
attr_name variable

line 1397 - removed call to blank function

line 1524, 1525 - removed if @options.key? because the key? function is invalid without an argument

line 1580 - removed else statement that is never needed

@rdlebeau rdlebeau requested a review from aploshay February 9, 2026 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant