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
Adjust specs after refactor
Aaron Contrerasedd42a9bc250
diff --git a/spec/controllers/shares_controller_spec.rb b/spec/controllers/shares_controller_spec.rbindex ab35cc1e711..608e02bebae 100644--- a/spec/controllers/shares_controller_spec.rb+++ b/spec/controllers/shares_controller_spec.rb@@ -114,7 +114,7 @@ RSpec.describe SharesController dolet(:strategy) doinstance_double(SharingStrategies::ProjectQueryStrategy,viewable?: false, manageable?: false,- shares_query: project_query)+ query: project_query)endbefore do@@ -131,7 +131,7 @@ RSpec.describe SharesController dolet(:strategy) doinstance_double(SharingStrategies::ProjectQueryStrategy,viewable?: true, manageable?: false,- shares_query: project_query)+ query: project_query)endbefore do@@ -149,7 +149,7 @@ RSpec.describe SharesController dolet(:strategy) doinstance_double(SharingStrategies::ProjectQueryStrategy,viewable?: false, manageable?: true,- shares_query: project_query)+ query: project_query)endbefore do@@ -178,7 +178,7 @@ RSpec.describe SharesController dolet(:strategy) doinstance_double(SharingStrategies::ProjectQueryStrategy,viewable?: false, manageable?: false,- shares_query: project_query)+ query: project_query)endbefore do@@ -195,7 +195,7 @@ RSpec.describe SharesController dolet(:strategy) doinstance_double(SharingStrategies::ProjectQueryStrategy,viewable?: true, manageable?: false,- shares_query: project_query)+ query: project_query)endbefore do@@ -232,7 +232,7 @@ RSpec.describe SharesController dolet(:strategy) doinstance_double(SharingStrategies::ProjectQueryStrategy,viewable?: false, manageable?: true,- shares_query: project_query)+ query: project_query)endbefore do@@ -292,7 +292,8 @@ RSpec.describe SharesController docontext "and there were no shares originally" dobefore do# Only new share- allow(controller).to receive(:current_visible_member_count).and_return(0 + 1)+ allow_any_instance_of(SharingStrategies::ProjectQueryStrategy)+ .to receive_messages(shares: [])endit "calls respond_with_replace_modal" do@@ -304,7 +305,9 @@ RSpec.describe SharesController docontext "and there was at least a share originally" dobefore do# Former + new share- allow(controller).to receive(:current_visible_member_count).and_return(1 + 1)+ # Only new share+ allow_any_instance_of(SharingStrategies::ProjectQueryStrategy)+ .to receive_messages(shares: [edit_member])endit "calls respond_with_prepend_shares" do@@ -347,7 +350,8 @@ RSpec.describe SharesController docontext "and the list of filtered shares is now empty" dobefore do# Only new share- allow(controller).to receive_message_chain(:load_query, :results).and_return([])+ allow_any_instance_of(SharingStrategies::ProjectQueryStrategy)+ .to receive_messages(shares: [])endit "calls respond_with_replace_modal" do@@ -366,7 +370,8 @@ RSpec.describe SharesController docontext "and the share no longer belongs to the list of filtered shares" dobefore do# Includes other share only, not the one being modified- allow(controller).to receive_message_chain(:load_query, :results).and_return([edit_member])+ allow_any_instance_of(SharingStrategies::ProjectQueryStrategy)+ .to receive_messages(shares: [edit_member])endit "calls respond_with_remove_share" do