Skip to content

refactor: Improve consistency in create_package_service_spec

What does this MR do and why?

This MR is a follow-up of the !134367 (merged). When working on the performance improvements in the context of !134367 (merged), I identified small refactoring opportunities to keep the code more consistent. The changes in this MR were not included in !134267 (merged) in order to keep the changes in !134367 (merged) focussed on performance improvements.

This MR includes:

  • Using single quote for string literals to keep the test code consistent
  • Using parameterized test for context 'with invalid name' to apply the same approach as used in context 'with invalid version' => keep test code consistent

🛠 with at Siemens

Screenshots or screen recordings

Only test -related changes. No frontend changes.

How to set up and validate locally

  1. Just run the test
bundle exec rspec spec/services/packages/npm/create_package_service_spec.rb

Todos

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Gerardo Navarro

Merge request reports