Change default visibility level for FogBugz imported projects to Private
This commit is contained in:
parent
336ef2a98c
commit
679e9cd1a5
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Change default visibility level for FogBugz imported projects to Private
|
||||
merge_request: 32142
|
||||
author:
|
||||
type: fixed
|
||||
|
|
@ -20,7 +20,7 @@ module Gitlab
|
|||
path: repo.path,
|
||||
namespace: namespace,
|
||||
creator: current_user,
|
||||
visibility_level: Gitlab::VisibilityLevel::INTERNAL,
|
||||
visibility_level: Gitlab::VisibilityLevel::PRIVATE,
|
||||
import_type: 'fogbugz',
|
||||
import_source: repo.name,
|
||||
import_url: Project::UNKNOWN_IMPORT_URL,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,29 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'spec_helper'
|
||||
|
||||
describe Gitlab::FogbugzImport::ProjectCreator do
|
||||
let(:user) { create(:user) }
|
||||
|
||||
let(:repo) do
|
||||
instance_double(Gitlab::FogbugzImport::Repository,
|
||||
name: 'Vim',
|
||||
safe_name: 'vim',
|
||||
path: 'vim',
|
||||
raw_data: '')
|
||||
end
|
||||
|
||||
let(:uri) { 'https://testing.fogbugz.com' }
|
||||
let(:token) { 'token' }
|
||||
let(:fb_session) { { uri: uri, token: token } }
|
||||
let(:project_creator) { described_class.new(repo, fb_session, user.namespace, user) }
|
||||
|
||||
subject do
|
||||
project_creator.execute
|
||||
end
|
||||
|
||||
it 'creates project with private visibility level' do
|
||||
expect(subject.persisted?).to eq(true)
|
||||
expect(subject.visibility_level).to eq(Gitlab::VisibilityLevel::PRIVATE)
|
||||
end
|
||||
end
|
||||
Loading…
Reference in New Issue