OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Adapt affected specs to opt-out of double verification
Oliver Günther1df0c00c2a9f
diff --git a/modules/auth_plugins/spec/requests/auth_plugins_spec.rb b/modules/auth_plugins/spec/requests/auth_plugins_spec.rbindex 56f90653384..8c4b10ce1f4 100644--- a/modules/auth_plugins/spec/requests/auth_plugins_spec.rb+++ b/modules/auth_plugins/spec/requests/auth_plugins_spec.rb@@ -50,17 +50,21 @@ RSpec.describe OpenProject::Plugins::AuthPlugin, with_ee: %i[board_view] doapp = Object.newomniauth_builder = Object.new- allow(omniauth_builder).to receive(:provider) { |strategy|- middlewares << strategy- }+ without_partial_double_verification do+ allow(omniauth_builder).to receive(:provider) { |strategy|+ middlewares << strategy+ }- allow(app).to receive_message_chain(:config, :middleware, :use) { |_mw, &block| # rubocop:disable RSpec/MessageChain- omniauth_builder.instance_eval(&block)- }+ allow(app).to receive_message_chain(:config, :middleware, :use) { |_mw, &block| # rubocop:disable RSpec/MessageChain+ omniauth_builder.instance_eval(&block)+ }+ endallow(described_class).to receive(:strategies).and_return(strategies)- allow(dummy_engine_klass).to receive(:engine_name).and_return("foobar")- allow(dummy_engine_klass).to receive(:initializer) { |_, &block| app.instance_eval(&block) }+ without_partial_double_verification do+ allow(dummy_engine_klass).to receive(:engine_name).and_return("foobar")+ allow(dummy_engine_klass).to receive(:initializer) { |_, &block| app.instance_eval(&block) }+ endenddescribe "ProviderBuilder" dodiff --git a/modules/auth_plugins/spec/views/base.html.erb_spec.rb b/modules/auth_plugins/spec/views/base.html.erb_spec.rbindex 0b889b7ac43..dff8b94e056 100644--- a/modules/auth_plugins/spec/views/base.html.erb_spec.rb+++ b/modules/auth_plugins/spec/views/base.html.erb_spec.rb@@ -35,9 +35,11 @@ RSpec.describe "layouts/base" dolet(:anonymous) { build_stubbed(:anonymous) }before do- allow(view).to receive(:current_menu_item).and_return("overview")- allow(view).to receive(:default_breadcrumb)- allow(view).to receive(:current_user).and_return anonymous+ without_partial_double_verification do+ allow(view).to receive(:current_menu_item).and_return("overview")+ allow(view).to receive(:default_breadcrumb)+ allow(view).to receive(:current_user).and_return anonymous+ endallow(OpenProject::Plugins::AuthPlugin).to receive(:providers).and_return([provider])enddiff --git a/modules/backlogs/spec/controllers/backlogs_settings_controller_spec.rb b/modules/backlogs/spec/controllers/backlogs_settings_controller_spec.rbindex b253fc6e5ad..931cd74b5ae 100644--- a/modules/backlogs/spec/controllers/backlogs_settings_controller_spec.rb+++ b/modules/backlogs/spec/controllers/backlogs_settings_controller_spec.rb@@ -66,7 +66,7 @@ RSpec.describe BacklogsSettingsController doit "does not update the settings" doexpect(Setting).not_to(receive(:[]=))- .with("plugin_openproject_backlogs")+ .with("plugin_openproject_backlogs", any_args)subject@@ -97,7 +97,7 @@ RSpec.describe BacklogsSettingsController doit "does not update the settings" doexpect(Setting).not_to(receive(:[]=))- .with("plugin_openproject_backlogs")+ .with("plugin_openproject_backlogs", any_args)subjectdiff --git a/modules/bim/spec/views/bim/ifc_models/ifc_models/index.html.erb_spec.rb b/modules/bim/spec/views/bim/ifc_models/ifc_models/index.html.erb_spec.rbindex 161b8fe54f1..b1a1d028d36 100644--- a/modules/bim/spec/views/bim/ifc_models/ifc_models/index.html.erb_spec.rb+++ b/modules/bim/spec/views/bim/ifc_models/ifc_models/index.html.erb_spec.rb@@ -51,7 +51,11 @@ RSpec.describe "bim/ifc_models/ifc_models/index" dobefore doassign(:project, project)ifc_models = [ifc_model]- allow(ifc_models).to receive(:defaults).and_return(ifc_models)++ without_partial_double_verification do+ allow(ifc_models).to receive(:defaults).and_return(ifc_models)+ end+assign(:ifc_models, ifc_models)controller.request.path_parameters[:project_id] = project.iddiff --git a/modules/costs/spec/lib/api/v3/costs_api_user_permission_check_spec.rb b/modules/costs/spec/lib/api/v3/costs_api_user_permission_check_spec.rbindex 97bbd1ff787..5d5a4477d2f 100644--- a/modules/costs/spec/lib/api/v3/costs_api_user_permission_check_spec.rb+++ b/modules/costs/spec/lib/api/v3/costs_api_user_permission_check_spec.rb@@ -52,8 +52,10 @@ RSpec.describe API::V3::CostsApiUserPermissionCheck dolet(:work_package) { build_stubbed(:work_package, project:) }before do- allow(subject).to receive(:current_user).and_return(user)- allow(subject).to receive(:represented).and_return(work_package)+ without_partial_double_verification do+ allow(subject).to receive(:current_user).and_return(user)+ allow(subject).to receive(:represented).and_return(work_package)+ endmock_permissions_for(user) do |mock|mock.allow_in_project :view_time_entries, project: work_package.project if view_time_entriesdiff --git a/modules/costs/spec/models/queries/time_entries/filters/activity_filter_spec.rb b/modules/costs/spec/models/queries/time_entries/filters/activity_filter_spec.rbindex 666387bd072..e5d903db60a 100644--- a/modules/costs/spec/models/queries/time_entries/filters/activity_filter_spec.rb+++ b/modules/costs/spec/models/queries/time_entries/filters/activity_filter_spec.rb@@ -45,19 +45,21 @@ RSpec.describe Queries::TimeEntries::Filters::ActivityFilter do.to receive_message_chain(:where, :or).and_return(activities)- allow(activities)- .to receive(:where)- .and_return(activities)+ without_partial_double_verification do+ allow(activities)+ .to receive(:where)+ .and_return(activities)- allow(activities)- .to receive(:pluck)- .with(:id)- .and_return(activities.map(&:id))+ allow(activities)+ .to receive(:pluck)+ .with(:id)+ .and_return(activities.map(&:id))- allow(activities)- .to receive(:pluck)- .with(:name, :id)- .and_return(activities.map { |x| [x.name, x.id] })+ allow(activities)+ .to receive(:pluck)+ .with(:name, :id)+ .and_return(activities.map { |x| [x.name, x.id] })+ endendit_behaves_like "basic query filter" dodiff --git a/modules/two_factor_authentication/spec/controllers/two_factor_authentication/authentication_controller_spec.rb b/modules/two_factor_authentication/spec/controllers/two_factor_authentication/authentication_controller_spec.rbindex 6edf06bba56..4a5387222d7 100644--- a/modules/two_factor_authentication/spec/controllers/two_factor_authentication/authentication_controller_spec.rb+++ b/modules/two_factor_authentication/spec/controllers/two_factor_authentication/authentication_controller_spec.rb@@ -10,7 +10,10 @@ RSpec.describe TwoFactorAuthentication::AuthenticationController, with_settings:before do# Assume the user has any membershipssession[:stage_secrets] = { two_factor_authentication: "asdf" }- allow_any_instance_of(User).to receive(:any_active_memberships?).and_return(true)++ without_partial_double_verification do+ allow_any_instance_of(User).to receive(:any_active_memberships?).and_return(true)+ endenddescribe "with no active strategy", with_settings: { "plugin_openproject_two_factor_authentication" => {} } dodiff --git a/spec/components/members/delete_member_dialog_component_spec.rb b/spec/components/members/delete_member_dialog_component_spec.rbindex 284b733550d..2fa4225b27c 100644--- a/spec/components/members/delete_member_dialog_component_spec.rb+++ b/spec/components/members/delete_member_dialog_component_spec.rb@@ -57,7 +57,9 @@ RSpec.describe Members::DeleteMemberDialogComponent, type: :component dolet(:principal) { build_stubbed(:user) }before do- allow(member).to receive(:inherited_shared_work_packages_count?).and_return(true)+ without_partial_double_verification do+ allow(member).to receive(:inherited_shared_work_packages_count?).and_return(true)+ endendit "renders dialog" do@@ -107,7 +109,9 @@ RSpec.describe Members::DeleteMemberDialogComponent, type: :component dolet(:stubs) { { can_delete?: false, can_delete_roles?: true, may_delete_shares?: true, shared_work_packages?: true } }before do- allow(member).to receive(:inherited_shared_work_packages_count?).and_return(true)+ without_partial_double_verification do+ allow(member).to receive(:inherited_shared_work_packages_count?).and_return(true)+ endendit "renders dialog" dodiff --git a/spec/components/members/delete_work_package_shares_dialog_component_spec.rb b/spec/components/members/delete_work_package_shares_dialog_component_spec.rbindex 88e31cf6882..1aee168f582 100644--- a/spec/components/members/delete_work_package_shares_dialog_component_spec.rb+++ b/spec/components/members/delete_work_package_shares_dialog_component_spec.rb@@ -61,7 +61,9 @@ RSpec.describe Members::DeleteWorkPackageSharesDialogComponent, type: :componentlet(:may_manage_user?) { true }before do- allow(member).to receive_messages(stubs)+ without_partial_double_verification do+ allow(member).to receive_messages(stubs)+ endendcontext "when there are direct, inherited and shares with filtered out role" dodiff --git a/spec/controllers/account_controller_spec.rb b/spec/controllers/account_controller_spec.rbindex 1d401b639ac..c4bed25654b 100644--- a/spec/controllers/account_controller_spec.rb+++ b/spec/controllers/account_controller_spec.rb@@ -519,7 +519,7 @@ RSpec.describe AccountController, :skip_2fa_stage docontext "with a valid token" dobefore do- allow(controller).to receive(:allow_lost_password_recovery).and_return(true)+ allow(controller).to receive(:allow_lost_password_recovery?).and_return(true)post :lost_password, params: { token: token.value }enddiff --git a/spec/controllers/concerns/omniauth_login_spec.rb b/spec/controllers/concerns/omniauth_login_spec.rbindex 5c78e08132d..44710cc06ad 100644--- a/spec/controllers/concerns/omniauth_login_spec.rb+++ b/spec/controllers/concerns/omniauth_login_spec.rb@@ -407,7 +407,7 @@ RSpec.describe AccountController, :skip_2fa_stage doendit "is rejected against google" do- expect(OpenProject::OmniAuth::Authorization).not_to receive(:after_login!).with(user)+ expect(OpenProject::OmniAuth::Authorization).not_to receive(:after_login!).with(user, any_args)post :omniauth_login, params: { provider: :google }@@ -416,7 +416,7 @@ RSpec.describe AccountController, :skip_2fa_stage doendit "is rejected against any other provider too" do- expect(OpenProject::OmniAuth::Authorization).not_to receive(:after_login!).with(user)+ expect(OpenProject::OmniAuth::Authorization).not_to receive(:after_login!).with(user, any_args)omniauth_hash.provider = "any other"post :omniauth_login, params: { provider: :google }@@ -434,7 +434,7 @@ RSpec.describe AccountController, :skip_2fa_stage doendit "is rejected against google" do- expect(OpenProject::OmniAuth::Authorization).not_to receive(:after_login!).with(user)+ expect(OpenProject::OmniAuth::Authorization).not_to receive(:after_login!).with(user, any_args)post :omniauth_login, params: { provider: :google }@@ -461,7 +461,7 @@ RSpec.describe AccountController, :skip_2fa_stage do# ... and to confirm that, here's what happens when the authorization failsit "is rejected against any other provider with the wrong email" do- expect(OpenProject::OmniAuth::Authorization).not_to receive(:after_login!).with(user)+ expect(OpenProject::OmniAuth::Authorization).not_to receive(:after_login!).with(user, any_args)omniauth_hash.provider = "yet another"config.global_email = "[email protected]"diff --git a/spec/controllers/custom_styles_controller_spec.rb b/spec/controllers/custom_styles_controller_spec.rbindex 3577715bc3e..68ba1efd3ac 100644--- a/spec/controllers/custom_styles_controller_spec.rb+++ b/spec/controllers/custom_styles_controller_spec.rb@@ -322,7 +322,6 @@ RSpec.describe CustomStylesController docontext "if it exists" dobefore doallow(CustomStyle).to receive(:current).and_return(custom_style)- allow(custom_style).to receive(:remove_cover).and_call_originaldelete :export_cover_deleteenddiff --git a/spec/helpers/settings_helper_spec.rb b/spec/helpers/settings_helper_spec.rbindex 96a9d04c47e..bdd4cde4174 100644--- a/spec/helpers/settings_helper_spec.rb+++ b/spec/helpers/settings_helper_spec.rb@@ -152,10 +152,13 @@ RSpec.describe SettingsHelper dobefore doallow(Setting).to receive(:host_name).at_least(:once).and_return("2")allow(Setting).to receive(:protocol).at_least(:once).and_return("3")- allow(Setting).to receive_messages(- host_name_writable?: true,- protocol_writable?: true- )++ without_partial_double_verification do+ allow(Setting).to receive_messages(+ host_name_writable?: true,+ protocol_writable?: true+ )+ endendit_behaves_like "not wrapped in container"diff --git a/spec/lib/acts_as_list/acts_as_list_patch_spec.rb b/spec/lib/acts_as_list/acts_as_list_patch_spec.rbindex 64cccc59b4a..635ec04fccb 100644--- a/spec/lib/acts_as_list/acts_as_list_patch_spec.rb+++ b/spec/lib/acts_as_list/acts_as_list_patch_spec.rb@@ -43,25 +43,33 @@ RSpec.describe "Models acting as list (acts_as_list)" doendit "moves to top when wanting to move highest" do- expect(includer).to receive :move_to_top+ without_partial_double_verification do+ expect(includer).to receive :move_to_top+ endincluder.move_to = "highest"endit "moves to bottom when wanting to move lowest" do- expect(includer).to receive :move_to_bottom+ without_partial_double_verification do+ expect(includer).to receive :move_to_bottom+ endincluder.move_to = "lowest"endit "moves higher when wanting to move higher" do- expect(includer).to receive :move_higher+ without_partial_double_verification do+ expect(includer).to receive :move_higher+ endincluder.move_to = "higher"endit "moves lower when wanting to move lower" do- expect(includer).to receive :move_lower+ without_partial_double_verification do+ expect(includer).to receive :move_lower+ endincluder.move_to = "lower"enddiff --git a/spec/lib/api/decorators/link_object_spec.rb b/spec/lib/api/decorators/link_object_spec.rbindex 5851d8bbeea..b3f32f597c3 100644--- a/spec/lib/api/decorators/link_object_spec.rb+++ b/spec/lib/api/decorators/link_object_spec.rb@@ -38,7 +38,9 @@ RSpec.describe API::Decorators::LinkObject dobefore dorepresented.foo_id = 1- allow(api_v3_paths).to receive(:foo) { |id| "/api/v3/foos/#{id}" }+ without_partial_double_verification do+ allow(api_v3_paths).to receive(:foo) { |id| "/api/v3/foos/#{id}" }+ endenddescribe "generation" do@@ -89,7 +91,10 @@ RSpec.describe API::Decorators::LinkObject dobefore dorepresented.getter = 1- allow(api_v3_paths).to receive(:foo_path) { |id| "/api/v3/fuhs/#{id}" }++ without_partial_double_verification do+ allow(api_v3_paths).to receive(:foo_path) { |id| "/api/v3/fuhs/#{id}" }+ endenddescribe "generation" dodiff --git a/spec/lib/api/v3/groups/group_collection_representer_spec.rb b/spec/lib/api/v3/groups/group_collection_representer_spec.rbindex e561406c47e..5a44eb0e095 100644--- a/spec/lib/api/v3/groups/group_collection_representer_spec.rb+++ b/spec/lib/api/v3/groups/group_collection_representer_spec.rb@@ -32,19 +32,21 @@ RSpec.describe API::V3::Groups::GroupCollectionRepresenter dolet(:self_base_link) { "/api/v3/groups" }let(:groups) dobuild_stubbed_list(:group, 3).tap do |groups|- allow(groups)- .to receive(:offset)- .with(page - 1)- .and_return(groups)+ without_partial_double_verification do+ allow(groups)+ .to receive(:offset)+ .with(page - 1)+ .and_return(groups)- allow(groups)- .to receive(:limit)- .with(page_size)- .and_return(groups)+ allow(groups)+ .to receive(:limit)+ .with(page_size)+ .and_return(groups)- allow(groups)- .to receive(:count)- .and_return(total)+ allow(groups)+ .to receive(:count)+ .and_return(total)+ endendendlet(:current_user) { build_stubbed(:user) }diff --git a/spec/lib/api/v3/memberships/membership_collection_representer_spec.rb b/spec/lib/api/v3/memberships/membership_collection_representer_spec.rbindex 96799c7f6e6..602acd252a7 100644--- a/spec/lib/api/v3/memberships/membership_collection_representer_spec.rb+++ b/spec/lib/api/v3/memberships/membership_collection_representer_spec.rb@@ -32,19 +32,21 @@ RSpec.describe API::V3::Memberships::MembershipCollectionRepresenter dolet(:self_base_link) { "/api/v3/members" }let(:members) dobuild_stubbed_list(:member, 3).tap do |members|- allow(members)- .to receive(:limit)- .with(page_size)- .and_return(members)+ without_partial_double_verification do+ allow(members)+ .to receive(:limit)+ .with(page_size)+ .and_return(members)- allow(members)- .to receive(:offset)- .with(page - 1)- .and_return(members)+ allow(members)+ .to receive(:offset)+ .with(page - 1)+ .and_return(members)- allow(members)- .to receive(:count)- .and_return(3)+ allow(members)+ .to receive(:count)+ .and_return(3)+ endendendlet(:current_user) { build_stubbed(:user) }diff --git a/spec/lib/api/v3/notifications/notification_collection_representer_spec.rb b/spec/lib/api/v3/notifications/notification_collection_representer_spec.rbindex fc43ac6d866..3de9abd7abb 100644--- a/spec/lib/api/v3/notifications/notification_collection_representer_spec.rb+++ b/spec/lib/api/v3/notifications/notification_collection_representer_spec.rb@@ -34,19 +34,21 @@ RSpec.describe API::V3::Notifications::NotificationCollectionRepresenter dolet(:notification_list) { build_stubbed_list(:notification, 3) }let(:notifications) donotification_list.tap do |items|- allow(items)+ without_partial_double_verification do+ allow(items).to receive(:limit).with(page_size).and_return(items)- allow(items)- .to receive(:offset)- .with(page - 1)- .and_return(items)+ allow(items)+ .to receive(:offset)+ .with(page - 1)+ .and_return(items)- allow(items)- .to receive(:count)- .and_return(total)+ allow(items)+ .to receive(:count)+ .and_return(total)+ endendendlet(:current_user) { build_stubbed(:user) }diff --git a/spec/lib/api/v3/placeholder_users/placeholder_user_collection_representer_spec.rb b/spec/lib/api/v3/placeholder_users/placeholder_user_collection_representer_spec.rbindex 1273928ba53..c272bf1dfde 100644--- a/spec/lib/api/v3/placeholder_users/placeholder_user_collection_representer_spec.rb+++ b/spec/lib/api/v3/placeholder_users/placeholder_user_collection_representer_spec.rb@@ -40,19 +40,21 @@ RSpec.describe API::V3::PlaceholderUsers::PlaceholderUserCollectionRepresenter dlet(:placeholders) doplaceholders = build_stubbed_list(:placeholder_user,actual_count)- allow(placeholders)- .to receive(:limit)- .with(page_size)- .and_return(placeholders)+ without_partial_double_verification do+ allow(placeholders)+ .to receive(:limit)+ .with(page_size)+ .and_return(placeholders)- allow(placeholders)- .to receive(:offset)- .with(page - 1)- .and_return(placeholders)+ allow(placeholders)+ .to receive(:offset)+ .with(page - 1)+ .and_return(placeholders)- allow(placeholders)- .to receive(:count)- .and_return(total)+ allow(placeholders)+ .to receive(:count)+ .and_return(total)+ endplaceholdersenddiff --git a/spec/lib/api/v3/relations/relation_paginated_collection_representer_spec.rb b/spec/lib/api/v3/relations/relation_paginated_collection_representer_spec.rbindex cc7788a3715..18c42b273dc 100644--- a/spec/lib/api/v3/relations/relation_paginated_collection_representer_spec.rb+++ b/spec/lib/api/v3/relations/relation_paginated_collection_representer_spec.rb@@ -35,19 +35,21 @@ RSpec.describe API::V3::Relations::RelationPaginatedCollectionRepresenter dolet(:relations) dobuild_stubbed_list(:relation, total).tap do |relations|- allow(relations)- .to receive(:limit)- .with(page_size)- .and_return(relations)+ without_partial_double_verification do+ allow(relations)+ .to receive(:limit)+ .with(page_size)+ .and_return(relations)- allow(relations)- .to receive(:offset)- .with(page - 1)- .and_return(relations)+ allow(relations)+ .to receive(:offset)+ .with(page - 1)+ .and_return(relations)- allow(relations)- .to receive(:count)- .and_return(relations.length)+ allow(relations)+ .to receive(:count)+ .and_return(relations.length)+ endendenddiff --git a/spec/lib/api/v3/shares/share_collection_representer_spec.rb b/spec/lib/api/v3/shares/share_collection_representer_spec.rbindex c4d4eb44b6e..6a2d3330de4 100644--- a/spec/lib/api/v3/shares/share_collection_representer_spec.rb+++ b/spec/lib/api/v3/shares/share_collection_representer_spec.rb@@ -32,9 +32,11 @@ RSpec.describe API::V3::Shares::ShareCollectionRepresenter dolet(:self_base_link) { "/api/v3/shares" }let(:members) dobuild_stubbed_list(:work_package_member, 3).tap do |members|- allow(members).to receive(:limit).with(page_size).and_return(members)- allow(members).to receive(:offset).with(page - 1).and_return(members)- allow(members).to receive(:count).and_return(3)+ without_partial_double_verification do+ allow(members).to receive(:limit).with(page_size).and_return(members)+ allow(members).to receive(:offset).with(page - 1).and_return(members)+ allow(members).to receive(:count).and_return(3)+ endendendlet(:current_user) { build_stubbed(:user) }diff --git a/spec/lib/api/v3/users/user_collection_representer_spec.rb b/spec/lib/api/v3/users/user_collection_representer_spec.rbindex 0595c98cfc3..12922f7f1b4 100644--- a/spec/lib/api/v3/users/user_collection_representer_spec.rb+++ b/spec/lib/api/v3/users/user_collection_representer_spec.rb@@ -39,19 +39,21 @@ RSpec.describe API::V3::Users::UserCollectionRepresenter dolet(:users) dousers = build_stubbed_list(:user,actual_count)- allow(users)- .to receive(:limit)- .with(page_size)- .and_return(users)+ without_partial_double_verification do+ allow(users)+ .to receive(:limit)+ .with(page_size)+ .and_return(users)- allow(users)- .to receive(:offset)- .with(page - 1)- .and_return(users)+ allow(users)+ .to receive(:offset)+ .with(page - 1)+ .and_return(users)- allow(users)- .to receive(:count)- .and_return(total)+ allow(users)+ .to receive(:count)+ .and_return(total)+ endusersenddiff --git a/spec/lib/api/v3/work_packages/work_package_at_timestamp_representer_rendering_spec.rb b/spec/lib/api/v3/work_packages/work_package_at_timestamp_representer_rendering_spec.rbindex 78280e53a0b..9d95eba9080 100644--- a/spec/lib/api/v3/work_packages/work_package_at_timestamp_representer_rendering_spec.rb+++ b/spec/lib/api/v3/work_packages/work_package_at_timestamp_representer_rendering_spec.rb@@ -107,24 +107,26 @@ RSpec.describe API::V3::WorkPackages::WorkPackageAtTimestampRepresenter, "renderlet(:model) dowork_package.tap do |model|# Mimicking the eager loading wrapper- allow(model)- .to receive(:timestamp)- .and_return(timestamp)- allow(model)- .to receive(:attributes_changed_to_baseline)- .and_return(attributes_changed_to_baseline)- allow(model)- .to receive(:exists_at_timestamp?)- .and_return(exists_at_timestamp)- allow(model)- .to receive(:with_query?)- .and_return(with_query)- allow(model)- .to receive(:matches_filters_at_timestamp?)- .and_return(matches_filters_at_timestamp)- allow(model)- .to receive(:exists_at_current_timestamp?)- .and_return(exists_at_current_timestamp)+ without_partial_double_verification do+ allow(model)+ .to receive(:timestamp)+ .and_return(timestamp)+ allow(model)+ .to receive(:attributes_changed_to_baseline)+ .and_return(attributes_changed_to_baseline)+ allow(model)+ .to receive(:exists_at_timestamp?)+ .and_return(exists_at_timestamp)+ allow(model)+ .to receive(:with_query?)+ .and_return(with_query)+ allow(model)+ .to receive(:matches_filters_at_timestamp?)+ .and_return(matches_filters_at_timestamp)+ allow(model)+ .to receive(:exists_at_current_timestamp?)+ .and_return(exists_at_current_timestamp)+ endendenddiff --git a/spec/lib/api/v3/work_packages/work_package_collection_representer_spec.rb b/spec/lib/api/v3/work_packages/work_package_collection_representer_spec.rbindex 3b9889dc872..35b12975f1d 100644--- a/spec/lib/api/v3/work_packages/work_package_collection_representer_spec.rb+++ b/spec/lib/api/v3/work_packages/work_package_collection_representer_spec.rb@@ -470,7 +470,11 @@ RSpec.describe API::V3::WorkPackages::WorkPackageCollectionRepresenter docontext "when passing groups" dolet(:groups) dogroup = { "custom" => "object" }- allow(group).to receive(:has_sums?).and_return false++ without_partial_double_verification do+ allow(group).to receive(:has_sums?).and_return false+ end+[group]end@@ -482,7 +486,11 @@ RSpec.describe API::V3::WorkPackages::WorkPackageCollectionRepresenter docontext "when passing groups with sums" dolet(:groups) dogroup = { "sums" => {} }- allow(group).to receive(:has_sums?).and_return true++ without_partial_double_verification do+ allow(group).to receive(:has_sums?).and_return true+ end+[group]enddiff --git a/spec/lib/api/v3/work_packages/work_package_representer_spec.rb b/spec/lib/api/v3/work_packages/work_package_representer_spec.rbindex 4a0ebbeb200..3a0ea3284d6 100644--- a/spec/lib/api/v3/work_packages/work_package_representer_spec.rb+++ b/spec/lib/api/v3/work_packages/work_package_representer_spec.rb@@ -1510,14 +1510,16 @@ RSpec.describe API::V3::WorkPackages::WorkPackageRepresenter doendit "factors in the eager loaded cache_checksum" do- allow(work_package)- .to receive(:cache_checksum)- .and_return(srand)+ without_partial_double_verification do+ allow(work_package)+ .to receive(:cache_checksum)+ .and_return(srand)- representer.json_cache_key+ representer.json_cache_key- expect(work_package)- .to have_received(:cache_checksum)+ expect(work_package)+ .to have_received(:cache_checksum)+ endendendenddiff --git a/spec/lib/custom_field_form_builder_spec.rb b/spec/lib/custom_field_form_builder_spec.rbindex 6962933669e..7d9d1888236 100644--- a/spec/lib/custom_field_form_builder_spec.rb+++ b/spec/lib/custom_field_form_builder_spec.rb@@ -58,9 +58,11 @@ RSpec.describe CustomFieldFormBuilder doendbefore do- allow(resource)- .to receive(custom_field.attribute_getter)- .and_return(typed_value)+ without_partial_double_verification do+ allow(resource)+ .to receive(custom_field.attribute_getter)+ .and_return(typed_value)+ endendsubject(:output) do@@ -259,9 +261,11 @@ RSpec.describe CustomFieldFormBuilder dobefore docustom_field.field_format = "user"- allow(project)- .to receive(custom_field.attribute_getter)- .and_return typed_value+ without_partial_double_verification do+ allow(project)+ .to receive(custom_field.attribute_getter)+ .and_return typed_value+ endallow(project).to(receive(:principals))@@ -314,13 +318,16 @@ RSpec.describe CustomFieldFormBuilder dobefore docustom_field.field_format = "version"- allow(project)- .to receive(custom_field.attribute_getter)- .and_return typed_value- allow(project)- .to receive(:shared_versions)- .and_return([version1, version2])+ without_partial_double_verification do+ allow(project)+ .to receive(custom_field.attribute_getter)+ .and_return typed_value++ allow(project)+ .to receive(:shared_versions)+ .and_return([version1, version2])+ endendit_behaves_like "wrapped in container", "select-container" dodiff --git a/spec/lib/open_project/text_formatting/markdown/child_pages_macro_spec.rb b/spec/lib/open_project/text_formatting/markdown/child_pages_macro_spec.rbindex 5524c83cfce..3fadfadbbe0 100644--- a/spec/lib/open_project/text_formatting/markdown/child_pages_macro_spec.rb+++ b/spec/lib/open_project/text_formatting/markdown/child_pages_macro_spec.rb@@ -108,7 +108,10 @@ RSpec.describe "OpenProject child pages macro" dologin_as userleaf_pageleaf_page_invisible_project- allow(Setting).to receive(:text_formatting).and_return("markdown")++ without_partial_double_verification do+ allow(Setting).to receive(:text_formatting).and_return("markdown")+ endenddef error_html(exception_msg)diff --git a/spec/mailers/digest_mailer_spec.rb b/spec/mailers/digest_mailer_spec.rbindex 44aa78f1d00..f6f2587b99d 100644--- a/spec/mailers/digest_mailer_spec.rb+++ b/spec/mailers/digest_mailer_spec.rb@@ -66,9 +66,11 @@ RSpec.describe DigestMailer do.to receive(:where).and_return(notifications)- allow(notifications)- .to receive(:includes)- .and_return(notifications)+ without_partial_double_verification do+ allow(notifications)+ .to receive(:includes)+ .and_return(notifications)+ endendenddiff --git a/spec/migrations/fix_untranslated_work_package_roles_spec.rb b/spec/migrations/fix_untranslated_work_package_roles_spec.rbindex b21e7dca18c..4954d3953a0 100644--- a/spec/migrations/fix_untranslated_work_package_roles_spec.rb+++ b/spec/migrations/fix_untranslated_work_package_roles_spec.rb@@ -76,7 +76,7 @@ RSpec.describe FixUntranslatedWorkPackageRoles, type: :model dodescribe "when #{env_var_name} is set with an unsupported language", :settings_reset doit "uses the English name", :settings_reset do- allow(Settings).to receive(:default_language).and_return("pt-br")+ allow(Setting).to receive(:default_language).and_return("pt-br")run_migrationexpect(WorkPackageRole.find_by(builtin: WorkPackageRole::BUILTIN_WORK_PACKAGE_EDITOR))diff --git a/spec/models/custom_actions/actions/custom_field_spec.rb b/spec/models/custom_actions/actions/custom_field_spec.rbindex b7de747558c..0be8cf8cac4 100644--- a/spec/models/custom_actions/actions/custom_field_spec.rb+++ b/spec/models/custom_actions/actions/custom_field_spec.rb@@ -614,15 +614,19 @@ RSpec.describe CustomActions::Actions::CustomField dolet(:custom_field) { send(:"#{type}_custom_field") }it "sets the value for #{type} custom fields" do- allow(work_package)- .to receive(custom_field.attribute_setter)+ without_partial_double_verification do+ allow(work_package)+ .to receive(custom_field.attribute_setter)+ endinstance.values = 42instance.apply(work_package)- expect(work_package)- .to have_received(custom_field.attribute_setter)- .with([42])+ without_partial_double_verification do+ expect(work_package)+ .to have_received(custom_field.attribute_setter)+ .with([42])+ endendend@@ -630,15 +634,17 @@ RSpec.describe CustomActions::Actions::CustomField dolet(:custom_field) { date_custom_field }it "sets the value to today for a dynamic value" do- allow(work_package)- .to receive(custom_field.attribute_setter)+ without_partial_double_verification do+ allow(work_package)+ .to receive(custom_field.attribute_setter)- instance.values = "%CURRENT_DATE%"- instance.apply(work_package)+ instance.values = "%CURRENT_DATE%"+ instance.apply(work_package)- expect(work_package)- .to have_received(custom_field.attribute_setter)- .with(Date.current)+ expect(work_package)+ .to have_received(custom_field.attribute_setter)+ .with(Date.current)+ endendendenddiff --git a/spec/models/queries/work_packages/filter/principal_loader_spec.rb b/spec/models/queries/work_packages/filter/principal_loader_spec.rbindex 4436d36ee3e..73f04d83158 100644--- a/spec/models/queries/work_packages/filter/principal_loader_spec.rb+++ b/spec/models/queries/work_packages/filter/principal_loader_spec.rb@@ -96,9 +96,11 @@ RSpec.describe Queries::WorkPackages::Filter::PrincipalLoader do.to receive(:visible).and_return(matching_principals)- allow(matching_principals)- .to receive(:not_builtin)- .and_return(matching_principals)+ without_partial_double_verification do+ allow(matching_principals)+ .to receive(:not_builtin)+ .and_return(matching_principals)+ endenddescribe "#user_values" dodiff --git a/spec/models/queries/work_packages/filter/project_filter_spec.rb b/spec/models/queries/work_packages/filter/project_filter_spec.rbindex 99de249d65f..b4247e58ac8 100644--- a/spec/models/queries/work_packages/filter/project_filter_spec.rb+++ b/spec/models/queries/work_packages/filter/project_filter_spec.rb@@ -45,14 +45,16 @@ RSpec.describe Queries::WorkPackages::Filter::ProjectFilter do.to receive(:active).and_return(visible_projects)- allow(visible_projects)- .to receive(:exists?)- .and_return(visible_projects.any?)-- allow(visible_projects)- .to receive(:where) do |args|- ids = args[:id]- visible_projects.select { |p| ids.include?(p.id) }+ without_partial_double_verification do+ allow(visible_projects)+ .to receive(:exists?)+ .and_return(visible_projects.any?)++ allow(visible_projects)+ .to receive(:where) do |args|+ ids = args[:id]+ visible_projects.select { |p| ids.include?(p.id) }+ endendenddiff --git a/spec/services/oauth_clients/connection_manager_spec.rb b/spec/services/oauth_clients/connection_manager_spec.rbindex a707b7ee3ef..45f28472919 100644--- a/spec/services/oauth_clients/connection_manager_spec.rb+++ b/spec/services/oauth_clients/connection_manager_spec.rb@@ -510,20 +510,25 @@ RSpec.describe OAuthClients::ConnectionManager, :webmock, type: :model dobefore doallow(instance).to receive(:refresh_token).and_return refresh_service_result- allow(yield_double_object)- .to receive(:yield_twice_method)- .and_return(- yield_service_result1,- yield_service_result2- )++ without_partial_double_verification do+ allow(yield_double_object)+ .to receive(:yield_twice_method)+ .and_return(+ yield_service_result1,+ yield_service_result2+ )+ endendit "returns a ServiceResult with success, without refresh" do- expect(subject.success).to be_truthy- expect(subject).to be yield_service_result2- expect(instance).to have_received(:refresh_token)- expect(oauth_client_token).to have_received(:reload)- expect(yield_double_object).to have_received(:yield_twice_method).twice+ without_partial_double_verification do+ expect(subject.success).to be_truthy+ expect(subject).to be yield_service_result2+ expect(instance).to have_received(:refresh_token)+ expect(oauth_client_token).to have_received(:reload)+ expect(yield_double_object).to have_received(:yield_twice_method).twice+ endendendenddiff --git a/spec/services/projects/delete_service_spec.rb b/spec/services/projects/delete_service_spec.rbindex 9658c4435e3..2890cb7e0c3 100644--- a/spec/services/projects/delete_service_spec.rb+++ b/spec/services/projects/delete_service_spec.rb@@ -39,13 +39,15 @@ RSpec.describe Projects::DeleteService, type: :model docontext "if authorized" docontext "when destroy succeeds" doit "destroys the projects" do- allow(project).to receive(:archive)- allow(Projects::DeleteProjectJob).to receive(:new)-- expect { subject }.to change(Project, :count).by(-1)- expect(project).not_to have_received(:archive)- expect(Projects::DeleteProjectJob)- .not_to have_received(:new)+ without_partial_double_verification do+ allow(project).to receive(:archive)+ allow(Projects::DeleteProjectJob).to receive(:new)++ expect { subject }.to change(Project, :count).by(-1)+ expect(project).not_to have_received(:archive)+ expect(Projects::DeleteProjectJob)+ .not_to have_received(:new)+ endendcontext "when the file storages are involved", :webmock dodiff --git a/spec/services/projects/set_attributes_service_spec.rb b/spec/services/projects/set_attributes_service_spec.rbindex 639b6a50357..e385260d8b8 100644--- a/spec/services/projects/set_attributes_service_spec.rb+++ b/spec/services/projects/set_attributes_service_spec.rb@@ -135,17 +135,6 @@ RSpec.describe Projects::SetAttributesService, type: :model do.to eql "lorem"endend-- context "with no identifier provided" do- it "stays nil" do- allow(Project)- .to receive(:next_identifier)- .and_return("ipsum")-- expect(subject.result.identifier)- .to be_nil- end- endenddescribe "public default value", with_settings: { default_projects_public: true } dodiff --git a/spec/services/users/login_service_spec.rb b/spec/services/users/login_service_spec.rbindex ec336451c8f..624fdf992c3 100644--- a/spec/services/users/login_service_spec.rb+++ b/spec/services/users/login_service_spec.rb@@ -48,7 +48,7 @@ RSpec.describe Users::LoginService, type: :model dobefore doallow(Sessions::DropOtherSessionsService)- .to receive(:call)+ .to receive(:call!).with(input_user, session)allow(controller)diff --git a/spec/support/api/v3/work_packages/work_package_representer_eager_loading.rb b/spec/support/api/v3/work_packages/work_package_representer_eager_loading.rbindex 3638c9a40e4..90da25cdc8c 100644--- a/spec/support/api/v3/work_packages/work_package_representer_eager_loading.rb+++ b/spec/support/api/v3/work_packages/work_package_representer_eager_loading.rb@@ -30,9 +30,11 @@ RSpec.shared_context "eager loaded work package representer" dobefore doallow(API::V3::WorkPackages::WorkPackageEagerLoadingWrapper).to receive(:wrap_one) do |work_package, _user|- allow(work_package)- .to receive(:cache_checksum)- .and_return(srand)+ without_partial_double_verification do+ allow(work_package)+ .to receive(:cache_checksum)+ .and_return(srand)+ endwork_packageenddiff --git a/spec/support/shared/with_direct_uploads.rb b/spec/support/shared/with_direct_uploads.rbindex 72e1cc181e4..1c192159274 100644--- a/spec/support/shared/with_direct_uploads.rb+++ b/spec/support/shared/with_direct_uploads.rb@@ -106,7 +106,8 @@ class WithDirectUploadsif redirectstub_with_redirect- else # use status response instead of redirect by default+ else+ # use status response instead of redirect by defaultstub_with_statusendend@@ -147,15 +148,17 @@ class WithDirectUploadsdef stub_uploadercreds = config[:fog][:credentials]- allow_any_instance_of(FogFileUploader).to receive(:fog_credentials).and_return creds+ without_partial_double_verification do+ allow_any_instance_of(FogFileUploader).to receive(:fog_credentials).and_return creds- allow_any_instance_of(FogFileUploader).to receive(:aws_access_key_id).and_return creds[:aws_access_key_id]- allow_any_instance_of(FogFileUploader).to receive(:aws_secret_access_key).and_return creds[:aws_secret_access_key]- allow_any_instance_of(FogFileUploader).to receive(:provider).and_return creds[:provider]- allow_any_instance_of(FogFileUploader).to receive(:region).and_return creds[:region]- allow_any_instance_of(FogFileUploader).to receive(:directory).and_return config[:fog][:directory]+ allow_any_instance_of(FogFileUploader).to receive(:aws_access_key_id).and_return creds[:aws_access_key_id]+ allow_any_instance_of(FogFileUploader).to receive(:aws_secret_access_key).and_return creds[:aws_secret_access_key]+ allow_any_instance_of(FogFileUploader).to receive(:provider).and_return creds[:provider]+ allow_any_instance_of(FogFileUploader).to receive(:region).and_return creds[:region]+ allow_any_instance_of(FogFileUploader).to receive(:directory).and_return config[:fog][:directory]- allow(OpenProject::Configuration).to receive(:direct_uploads?).and_return(true)+ allow(OpenProject::Configuration).to receive(:direct_uploads?).and_return(true)+ endenddef stub_config(example)diff --git a/spec/views/layouts/admin.html.erb_spec.rb b/spec/views/layouts/admin.html.erb_spec.rbindex 098ecefe392..d71a6dfa0a7 100644--- a/spec/views/layouts/admin.html.erb_spec.rb+++ b/spec/views/layouts/admin.html.erb_spec.rb@@ -35,18 +35,20 @@ RSpec.describe "layouts/admin" dohelper Redmine::MenuManager::MenuHelperbefore do- allow(view).to receive(:current_menu_item).and_return("overview")- allow(view).to receive(:default_breadcrumb)- allow(controller).to receive(:default_search_scope)+ without_partial_double_verification do+ allow(view).to receive(:current_menu_item).and_return("overview")+ allow(view).to receive(:default_breadcrumb)+ allow(view).to receive(:current_user).and_return admin- parent_menu_item = Object.new- allow(view).to receive(:admin_first_level_menu_entry).and_return parent_menu_item- allow(parent_menu_item).to receive(:name).and_return :root+ parent_menu_item = Object.new+ allow(parent_menu_item).to receive(:name).and_return :root+ allow(view).to receive(:admin_first_level_menu_entry).and_return parent_menu_item++ allow(controller).to receive(:default_search_scope)+ allow(view).to receive(:render_to_string)+ endallow(User).to receive(:current).and_return admin- allow(view).to receive(:current_user).and_return admin- allow(view)- .to receive(:render_to_string)end# All password-based authentication is to be hidden and disabled ifdiff --git a/spec/views/layouts/base.html.erb_spec.rb b/spec/views/layouts/base.html.erb_spec.rbindex db5a8df9ef2..3b895a88847 100644--- a/spec/views/layouts/base.html.erb_spec.rb+++ b/spec/views/layouts/base.html.erb_spec.rb@@ -41,14 +41,15 @@ RSpec.describe "layouts/base" dolet(:anonymous) { build_stubbed(:anonymous) }before do- allow(view).to receive(:current_menu_item).and_return("overview")- allow(view).to receive(:default_breadcrumb)- allow(controller).to receive(:default_search_scope)- allow(view)- .to receive(:render_to_string)+ without_partial_double_verification do+ allow(view).to receive(:current_menu_item).and_return("overview")+ allow(view).to receive(:default_breadcrumb)+ allow(controller).to receive(:default_search_scope)+ allow(view).to receive(:render_to_string)+ allow(view).to receive(:current_user).and_return current_user+ endallow(User).to receive(:current).and_return current_user- allow(view).to receive(:current_user).and_return current_userenddescribe "Sign in button" dodiff --git a/spec/views/users/edit.html.erb_spec.rb b/spec/views/users/edit.html.erb_spec.rbindex 054259a0c39..2ac75227d92 100644--- a/spec/views/users/edit.html.erb_spec.rb+++ b/spec/views/users/edit.html.erb_spec.rb@@ -48,7 +48,9 @@ RSpec.describe "users/edit" doassign(:user, user)assign(:auth_sources, [])- allow(view).to receive(:current_user).and_return(admin)+ without_partial_double_verification do+ allow(view).to receive(:current_user).and_return(admin)+ endendit "shows the authentication provider" do@@ -75,7 +77,9 @@ RSpec.describe "users/edit" docontext "for an admin" dobefore do- allow(view).to receive(:current_user).and_return(admin)+ without_partial_double_verification do+ allow(view).to receive(:current_user).and_return(admin)+ endrenderend@@ -88,7 +92,9 @@ RSpec.describe "users/edit" dolet(:non_admin) { create(:user, global_permissions: [:manage_user]) }before do- allow(view).to receive(:current_user).and_return(non_admin)+ without_partial_double_verification do+ allow(view).to receive(:current_user).and_return(non_admin)+ endrenderend@@ -105,7 +111,9 @@ RSpec.describe "users/edit" doassign(:user, user)assign(:auth_sources, [])- allow(view).to receive(:current_user).and_return(admin)+ without_partial_double_verification do+ allow(view).to receive(:current_user).and_return(admin)+ endrenderend@@ -121,7 +129,9 @@ RSpec.describe "users/edit" doassign :user, userassign :auth_sources, []- allow(view).to receive(:current_user).and_return(admin)+ without_partial_double_verification do+ allow(view).to receive(:current_user).and_return(admin)+ endendcontext "with password login disabled" dodiff --git a/spec/views/users/index.html.erb_spec.rb b/spec/views/users/index.html.erb_spec.rbindex 1107f0134fd..cbfb9d85eff 100644--- a/spec/views/users/index.html.erb_spec.rb+++ b/spec/views/users/index.html.erb_spec.rb@@ -39,9 +39,11 @@ RSpec.describe "users/index" doassign(:status, "all")assign(:groups, Group.all)- allow(view).to receive(:current_user).and_return(admin)- allow(view).to receive(:controller_name).and_return("users")- allow(view).to receive(:action_name).and_return("index")+ without_partial_double_verification do+ allow(view).to receive(:current_user).and_return(admin)+ allow(view).to receive(:controller_name).and_return("users")+ allow(view).to receive(:action_name).and_return("index")+ endendsubject { rendered.squish }diff --git a/spec/views/wiki/new.html.erb_spec.rb b/spec/views/wiki/new.html.erb_spec.rbindex 76d21366642..8b850cc99de 100644--- a/spec/views/wiki/new.html.erb_spec.rb+++ b/spec/views/wiki/new.html.erb_spec.rb@@ -41,9 +41,12 @@ RSpec.describe "wiki/new" doassign(:wiki, wiki)assign(:page, page)assign(:content, content)- allow(view)- .to receive(:current_user)- .and_return(user)++ without_partial_double_verification do+ allow(view)+ .to receive(:current_user)+ .and_return(user)+ endendit "renders a form which POSTs to create_project_wiki_index_path" dodiff --git a/spec/workers/mails/shared/member_job.rb b/spec/workers/mails/shared/member_job.rbindex 0fa3865a00f..b19bbf570ff 100644--- a/spec/workers/mails/shared/member_job.rb+++ b/spec/workers/mails/shared/member_job.rb@@ -67,23 +67,25 @@ RSpec.shared_examples "member job" dobuild_stubbed(:group).tap do |g|scope = group_user_members- allow(Member)- .to receive(:of_project)- .with(project)- .and_return(scope)-- allow(scope)- .to receive(:where)- .with(principal: group_users)- .and_return(scope)-- allow(scope)- .to receive(:includes)- .and_return(scope)-- allow(g)- .to receive(:users)- .and_return(group_users)+ without_partial_double_verification do+ allow(Member)+ .to receive(:of_project)+ .with(project)+ .and_return(scope)++ allow(scope)+ .to receive(:where)+ .with(principal: group_users)+ .and_return(scope)++ allow(scope)+ .to receive(:includes)+ .and_return(scope)++ allow(g)+ .to receive(:users)+ .and_return(group_users)+ endendendlet(:group_user_members) { [] }diff --git a/spec/workers/mails/shared/watcher_job.rb b/spec/workers/mails/shared/watcher_job.rbindex 1420cd6e5d5..c62d0dc085a 100644--- a/spec/workers/mails/shared/watcher_job.rb+++ b/spec/workers/mails/shared/watcher_job.rb@@ -53,9 +53,11 @@ RSpec.shared_examples "watcher job" do |action|.to receive(:notification_settings).and_return(notification_settings)- allow(notification_settings)- .to receive(:applicable)- .and_return(notification_settings)+ without_partial_double_verification do+ allow(notification_settings)+ .to receive(:applicable)+ .and_return(notification_settings)+ endendenddiff --git a/spec/workers/mails/work_package_shared_job_spec.rb b/spec/workers/mails/work_package_shared_job_spec.rbindex 75c26ea8e50..1d4e145676d 100644--- a/spec/workers/mails/work_package_shared_job_spec.rb+++ b/spec/workers/mails/work_package_shared_job_spec.rb@@ -82,21 +82,23 @@ RSpec.describe Mails::WorkPackageSharedJob, type: :model do.with(work_package).and_return(group_user_members)- allow(scope)- .to receive_messages(joins: scope, references: scope)-- allow(scope)- .to receive(:where)- .with(principal: group_users)- .and_return(scope)-- allow(scope)- .to receive_messages(group: scope, having: scope, select: group_user_members_due_an_email.map(&:id))-- allow(Member)- .to receive(:where)- .with(id: group_user_members_due_an_email.map(&:id))- .and_return(group_user_members_due_an_email)+ without_partial_double_verification do+ allow(scope)+ .to receive_messages(joins: scope, references: scope)++ allow(scope)+ .to receive(:where)+ .with(principal: group_users)+ .and_return(scope)++ allow(scope)+ .to receive_messages(group: scope, having: scope, select: group_user_members_due_an_email.map(&:id))++ allow(Member)+ .to receive(:where)+ .with(id: group_user_members_due_an_email.map(&:id))+ .and_return(group_user_members_due_an_email)+ endendendlet(:group_member_role) do