Commit f2628cc7 authored by Marc Shaw's avatar Marc Shaw

Fix depreciation warning for positional args for project creator spec

Issue: gitlab.com/gitlab-org/gitlab/-/issues/258994
parent f0e61d9b
......@@ -31,9 +31,8 @@ module Import
project_name,
target_namespace,
current_user,
access_params,
type: provider
).execute(extra_project_attrs)
type: provider,
**access_params).execute(extra_project_attrs)
end
def repo
......
......@@ -5,7 +5,7 @@ module Gitlab
class ProjectCreator
attr_reader :repo, :name, :namespace, :current_user, :session_data, :type
def initialize(repo, name, namespace, current_user, session_data, type: 'github')
def initialize(repo, name, namespace, current_user, type: 'github', **session_data)
@repo = repo
@name = name
@namespace = namespace
......
......@@ -44,7 +44,7 @@ RSpec.describe API::ImportGithub do
it 'returns 201 response when the project is imported successfully' do
allow(Gitlab::LegacyGithubImport::ProjectCreator)
.to receive(:new).with(provider_repo, provider_repo.name, user.namespace, user, access_params, type: provider)
.to receive(:new).with(provider_repo, provider_repo.name, user.namespace, user, type: provider, **access_params)
.and_return(double(execute: project))
post api("/import/github", user), params: {
......@@ -59,7 +59,7 @@ RSpec.describe API::ImportGithub do
it 'returns 201 response when the project is imported successfully from GHE' do
allow(Gitlab::LegacyGithubImport::ProjectCreator)
.to receive(:new).with(provider_repo, provider_repo.name, user.namespace, user, access_params, type: provider)
.to receive(:new).with(provider_repo, provider_repo.name, user.namespace, user, type: provider, **access_params)
.and_return(double(execute: project))
post api("/import/github", user), params: {
......
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