diff options
author | Robert Speicher <robert@gitlab.com> | 2017-09-01 23:32:27 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2017-09-01 23:32:27 +0000 |
commit | 1e60725174cf8cfac1b54bbcdb1453d74bfdd37e (patch) | |
tree | 0e6e5d2cd9cae3b1b0ad6998d6647c38e9a7236a | |
parent | 223849fa173b7059e717ba4f9c02075a452cbd49 (diff) | |
parent | 7cc19cd5abb4ae8649e960c71d531adccb880a89 (diff) | |
download | gitlab-ce-1e60725174cf8cfac1b54bbcdb1453d74bfdd37e.tar.gz |
Merge branch 'rs-fix-master' into 'master'
Ensure `issuables_count_for_state` returns the requested state count
Closes #37353
See merge request !14005
-rw-r--r-- | app/helpers/issuables_helper.rb | 2 | ||||
-rw-r--r-- | spec/services/issues/update_service_spec.rb | 2 |
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) |