From 78806341fdf6eac6e34e894d19b6b617b5cabf3a Mon Sep 17 00:00:00 2001 From: Daniel Cloud Date: Fri, 22 Mar 2024 15:43:27 -0400 Subject: [PATCH] Update/fix test for tracking_list and the first tracking item --- .../serializer/v1/prescription_details_serializer_spec.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/my_health/spec/serializer/v1/prescription_details_serializer_spec.rb b/modules/my_health/spec/serializer/v1/prescription_details_serializer_spec.rb index a431e80e020..9cf6b3a186b 100644 --- a/modules/my_health/spec/serializer/v1/prescription_details_serializer_spec.rb +++ b/modules/my_health/spec/serializer/v1/prescription_details_serializer_spec.rb @@ -173,7 +173,8 @@ it 'includes the tracking_list records as an array' do tracking_list = attributes['tracking_list'] expect(tracking_list).to be_an(Array) - expect(tracking_list[0]).to all(be_a(Hash)) - expect(tracking_list[0]).to include(carrier: 'UPS', complete_date_time: '2023-03-28T04:39:11-04:00') + tracking_item = tracking_list[0] + expect(tracking_item).to be_a(Hash) + expect(tracking_list[0]).to include({ 'carrier' => 'UPS', 'complete_date_time' => '2023-03-28T04:39:11-04:00' }) end end