Skip to content

Test MR Helper diff for path endpoint

What does this MR do and why?

For #393471 (closed)

A prior defect incorrectly used project.namespace.path when project.namespace.to_param was actually correct.

This new set of tests exercises the 4 situations (that I am aware of) that would lead to varying namespace paths to ensure they're being output properly.

Cases:

  1. "Normal"/"default" (a user/org + project)
  2. Group + project
  3. Sub-group + project
  4. Sub-group of a sub-group + project

In theory, testing that Item 4 (sub-sub-group) works should be enough to infer that any amount of sub-groups, no matter how nested, will work.

Screenshots or screen recordings

All tests, N/A

How to set up and validate locally

  1. bundle exec rspec spec/helpers/merge_requests_helper_spec.rb:37

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 Thomas Randolph

Merge request reports