summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/helpers/issuables_helper.rb2
-rw-r--r--spec/services/issues/update_service_spec.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/helpers/issuables_helper.rb b/app/helpers/issuables_helper.rb
index 5d7d33da30a..f4d452b3c9b 100644
--- a/app/helpers/issuables_helper.rb
+++ b/app/helpers/issuables_helper.rb
@@ -242,7 +242,7 @@ module IssuablesHelper
def issuables_count_for_state(issuable_type, state)
finder = public_send("#{issuable_type}_finder") # rubocop:disable GitlabSecurity/PublicSend
- finder.count_by_state
+ finder.count_by_state[state]
end
def close_issuable_url(issuable)
diff --git a/spec/services/issues/update_service_spec.rb b/spec/services/issues/update_service_spec.rb
index 2176469aba6..85f46838351 100644
--- a/spec/services/issues/update_service_spec.rb
+++ b/spec/services/issues/update_service_spec.rb
@@ -519,7 +519,7 @@ describe Issues::UpdateService, :mailer do
end
it 'calls the move service with the proper issue and project' do
- move_stub = class_double("Issues::MoveService").as_stubbed_const
+ move_stub = instance_double(Issues::MoveService)
allow(Issues::MoveService).to receive(:new).and_return(move_stub)
allow(move_stub).to receive(:execute).with(issue, target_project).and_return(issue)