From cf9342f2c4fdaa903a17b9b65c1b39172df9c16b Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bellet Date: Thu, 25 May 2023 14:52:31 +0200 Subject: [PATCH] Prefer using `match_array` over `eq` to compare array As we don't need order: https://rubydoc.info/github/rspec/rspec-expectations/RSpec%2FMatchers:match_array --- spec/controllers/api/v0/order_cycles_controller_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/controllers/api/v0/order_cycles_controller_spec.rb b/spec/controllers/api/v0/order_cycles_controller_spec.rb index 431e05db01..789d7d9615 100644 --- a/spec/controllers/api/v0/order_cycles_controller_spec.rb +++ b/spec/controllers/api/v0/order_cycles_controller_spec.rb @@ -91,7 +91,7 @@ module Api q: { with_properties: [supplier_property.id] } expect(response.status).to eq 200 - expect(product_ids).to eq [product1.id, product2.id] + expect(product_ids).to match_array [product1.id, product2.id] expect(product_ids).to_not include product3.id end end