Add factories and shared contexts for V2 approval rules testing

Add FactoryBot factory and RSpec shared contexts to support testing v2 approval rules.

Requirements:

  • Add FactoryBot factory for MergeRequests::ApprovalRule with origin: :merge_request
  • Add traits: :with_users, :with_groups, :with_source_rule
  • Add shared context with_v2_approval_rules_enabled (enables feature flag)
  • Add shared context with_v2_approval_rules_disabled (disables feature flag)

Reference: v2 Approval Rules POC (!222865)

Edited Feb 12, 2026 by Gavin Hinfey
Assignee Loading
Time tracking Loading