Commit c5458ddf authored by Rémy Coutable's avatar Rémy Coutable

Fix Ruby 2.7 warnings in spec/support/helpers/cycle_analytics_helpers.rb

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent ad138e9c
......@@ -126,17 +126,15 @@ module CycleAnalyticsHelpers
end
def mock_gitaly_multi_action_dates(repository, commit_time)
allow(repository.raw).to receive(:multi_action).and_wrap_original do |m, *args|
allow(repository.raw).to receive(:multi_action).and_wrap_original do |m, user, kargs|
new_date = commit_time || Time.now
branch_update = m.call(*args)
branch_update = m.call(user, **kargs)
if branch_update.newrev
_, opts = args
commit = rugged_repo(repository).rev_parse(branch_update.newrev)
branch_update.newrev = commit.amend(
update_ref: "#{Gitlab::Git::BRANCH_REF_PREFIX}#{opts[:branch_name]}",
update_ref: "#{Gitlab::Git::BRANCH_REF_PREFIX}#{kargs[:branch_name]}",
author: commit.author.merge(time: new_date),
committer: commit.committer.merge(time: new_date)
)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment