summaryrefslogtreecommitdiff
path: root/spec/support/helpers/cycle_analytics_helpers.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/helpers/cycle_analytics_helpers.rb')
-rw-r--r--spec/support/helpers/cycle_analytics_helpers.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/spec/support/helpers/cycle_analytics_helpers.rb b/spec/support/helpers/cycle_analytics_helpers.rb
index f4343b8b783..6d3ac699a7c 100644
--- a/spec/support/helpers/cycle_analytics_helpers.rb
+++ b/spec/support/helpers/cycle_analytics_helpers.rb
@@ -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)
)