Skip to content

Migrate internal events shared examples to use new custom matchers

Sarah Yasonik requested to merge sy-custom-matcher-pipeline-test into master

What does this MR do and why?

Changes: Updates the 'internal event tracking' rspec shared example to use new custom matchers & fixes/accommodates anywhere that the shared example reveals bad setup/weak tests/etc.

Context: !149185 (merged) introduced two new rspec matchers trigger_internal_events & increment_usage_metrics. These matchers are more robust and test the result of events/metrics, so they can be used in more scenarios than the existing shared example.

Out of scope: There are a couple of spots where I think the current behavior is incorrect and should be fixed. For the sake of keeping this a refactor only, I opted to write assertions against the existing behavior and not fix any underlying issues.

Related issue: #450452

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

How to set up and validate locally

  1. Run bundle exec rspec -e 'internal event tracking' -r 'spec_helper' to run tests including the shared example locally
Edited by Sarah Yasonik

Merge request reports