From a943f8120b4bcfbf3431734633673b113fe6a2c2 Mon Sep 17 00:00:00 2001 From: Cory Streiff <90390502+coalest@users.noreply.github.com> Date: Fri, 20 Dec 2024 00:57:55 +0100 Subject: [PATCH] Fix flaky partners requests request spec (#4870) We were expecting the `family_zipcodes_list` to have a certain order but no order is guaranteed in the request. --- spec/requests/partners_requests_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/requests/partners_requests_spec.rb b/spec/requests/partners_requests_spec.rb index 9084b6251d..ef086fddfb 100644 --- a/spec/requests/partners_requests_spec.rb +++ b/spec/requests/partners_requests_spec.rb @@ -100,7 +100,7 @@ families_served: 3, children_served: 4, family_zipcodes: 2, - family_zipcodes_list: %w(45612-123 45612-126) + family_zipcodes_list: contain_exactly("45612-126", "45612-123") # order of zipcodes not guaranteed } end @@ -127,7 +127,7 @@ context "when the partner is invited" do it "includes impact metrics" do subject - expect(assigns[:impact_metrics]).to eq(expected_impact_metrics) + expect(assigns[:impact_metrics]).to match(expected_impact_metrics) end end