refactor: Improve consistency in create_package_service_spec
requested to merge gitlab-community/gitlab:refactor-improve-consistency-create_package_service_spec into master
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
Screenshots or screen recordings
Only test -related changes. No frontend changes.
How to set up and validate locally
- 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.
-
I have evaluated the MR acceptance checklist for this MR. -
Changelog entry added, if necessary -
Documentation created/updated via this MR -
Documentation reviewed by technical writer or follow-up review issue created -
Tests added for this feature/bug -
Tested in all supported browsers -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the javascript style guides -
Conforms to the database guides
-
Edited by Gerardo Navarro