diff --git a/ee/spec/services/ci/minutes/batch_reset_service_spec.rb b/ee/spec/services/ci/minutes/batch_reset_service_spec.rb
index 5df742072f9ff78f790db9967646adb1eed548f2..4a8e42db9ab957b6b88269d527f3652a0c2816b1 100644
--- a/ee/spec/services/ci/minutes/batch_reset_service_spec.rb
+++ b/ee/spec/services/ci/minutes/batch_reset_service_spec.rb
@@ -46,8 +46,8 @@ def create_namespace_with_project(seconds_used, monthly_minutes_limit = nil)
       let(:namespaces_exceeding_minutes) { [namespace_1, namespace_2, namespace_3] }
 
       it 'resets minutes in batches for the given range and ignores project namespaces' do
-        expect(service).to receive(:reset_ci_minutes!).with([namespace_1, namespace_2, namespace_3])
-        expect(service).to receive(:reset_ci_minutes!).with([namespace_4, namespace_5])
+        expect(service).to receive(:reset_ci_minutes!).with(match_array([namespace_1, namespace_2, namespace_3]))
+        expect(service).to receive(:reset_ci_minutes!).with(match_array([namespace_4, namespace_5]))
 
         subject
       end
@@ -75,8 +75,8 @@ def create_namespace_with_project(seconds_used, monthly_minutes_limit = nil)
         end
 
         it 'continues its progress and raises exception at the end' do
-          expect(service).to receive(:reset_ci_minutes!).with([namespace_1, namespace_2, namespace_3]).and_call_original
-          expect(service).to receive(:reset_ci_minutes!).with([namespace_4, namespace_5]).and_call_original
+          expect(service).to receive(:reset_ci_minutes!).with(match_array([namespace_1, namespace_2, namespace_3])).and_call_original
+          expect(service).to receive(:reset_ci_minutes!).with(match_array([namespace_4, namespace_5])).and_call_original
 
           expect { subject }
             .to raise_error(described_class::BatchNotResetError) do |error|