Fix BitbucketImport::ProjectCreator spec
This commit is contained in:
parent
c7c4d657b4
commit
2747e515c6
1 changed files with 9 additions and 7 deletions
|
@ -3,12 +3,14 @@ require 'spec_helper'
|
|||
describe Gitlab::BitbucketImport::ProjectCreator, lib: true do
|
||||
let(:user) { create(:user) }
|
||||
let(:repo) do
|
||||
{
|
||||
name: 'Vim',
|
||||
slug: 'vim',
|
||||
is_private: true,
|
||||
owner: "asd"
|
||||
}.with_indifferent_access
|
||||
double(name: 'Vim',
|
||||
slug: 'vim',
|
||||
description: 'Test repo',
|
||||
is_private: true,
|
||||
owner: "asd",
|
||||
full_name: 'Vim repo',
|
||||
visibility_level: Gitlab::VisibilityLevel::PRIVATE,
|
||||
clone_url: 'ssh://git@bitbucket.org/asd/vim.git')
|
||||
end
|
||||
let(:namespace){ create(:group, owner: user) }
|
||||
let(:token) { "asdasd12345" }
|
||||
|
@ -22,7 +24,7 @@ describe Gitlab::BitbucketImport::ProjectCreator, lib: true do
|
|||
it 'creates project' do
|
||||
allow_any_instance_of(Project).to receive(:add_import_job)
|
||||
|
||||
project_creator = Gitlab::BitbucketImport::ProjectCreator.new(repo, namespace, user, access_params)
|
||||
project_creator = Gitlab::BitbucketImport::ProjectCreator.new(repo, 'vim', namespace, user, access_params)
|
||||
project = project_creator.execute
|
||||
|
||||
expect(project.import_url).to eq("ssh://git@bitbucket.org/asd/vim.git")
|
||||
|
|
Loading…
Reference in a new issue