Merge branch 'rs-fix-master' into 'master'

Ensure `issuables_count_for_state` returns the requested state count

Closes #37353

See merge request !14005
This commit is contained in:
Robert Speicher 2017-09-01 23:32:27 +00:00
commit 1e60725174
2 changed files with 2 additions and 2 deletions

View file

@ -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)

View file

@ -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)