From 98bdb5f11aae8bd0b5083fa86587a99303b24b32 Mon Sep 17 00:00:00 2001 From: Carlos Palhares Date: Mon, 6 Nov 2023 16:06:01 -0300 Subject: [PATCH] Fix rubocop violation --- packages/consent/lib/consent/rspec/consent_view.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/consent/lib/consent/rspec/consent_view.rb b/packages/consent/lib/consent/rspec/consent_view.rb index 38c50197b..32bb91663 100644 --- a/packages/consent/lib/consent/rspec/consent_view.rb +++ b/packages/consent/lib/consent/rspec/consent_view.rb @@ -63,8 +63,8 @@ def failure_message_base(failure) # rubocop:disable Metrics/MethodLength ) else actual_views = Consent.find_subjects(@subject_key) - .map(&:views) - .map(&:keys).flatten + .map { |subject| subject.views } + .flat_map { |views| views.keys } format( "%s available views are %p", message: message, views: actual_views