summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/bitbucket_import
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2016-11-19 22:39:12 -0800
committerStan Hu <stanhu@gmail.com>2016-11-21 16:47:30 -0800
commit2747e515c6b06a905512c00af428b1a0aa018569 (patch)
treebb2007fdd42b5fe6ce425abc61a646f934e54075 /spec/lib/gitlab/bitbucket_import
parentc7c4d657b427c6fa146319ccc5aa17e87d3d0e0b (diff)
downloadgitlab-ce-2747e515c6b06a905512c00af428b1a0aa018569.tar.gz
Fix BitbucketImport::ProjectCreator spec
Diffstat (limited to 'spec/lib/gitlab/bitbucket_import')
-rw-r--r--spec/lib/gitlab/bitbucket_import/project_creator_spec.rb16
1 files changed, 9 insertions, 7 deletions
diff --git a/spec/lib/gitlab/bitbucket_import/project_creator_spec.rb b/spec/lib/gitlab/bitbucket_import/project_creator_spec.rb
index e1c60e07b4d..bb007949557 100644
--- a/spec/lib/gitlab/bitbucket_import/project_creator_spec.rb
+++ b/spec/lib/gitlab/bitbucket_import/project_creator_spec.rb
@@ -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")