Commit 679e9cd1 authored by George Koltsov's avatar George Koltsov Committed by Rémy Coutable

Change default visibility level for FogBugz imported projects to Private

parent 336ef2a9
---
title: Change default visibility level for FogBugz imported projects to Private
merge_request: 32142
author:
type: fixed
...@@ -20,7 +20,7 @@ module Gitlab ...@@ -20,7 +20,7 @@ module Gitlab
path: repo.path, path: repo.path,
namespace: namespace, namespace: namespace,
creator: current_user, creator: current_user,
visibility_level: Gitlab::VisibilityLevel::INTERNAL, visibility_level: Gitlab::VisibilityLevel::PRIVATE,
import_type: 'fogbugz', import_type: 'fogbugz',
import_source: repo.name, import_source: repo.name,
import_url: Project::UNKNOWN_IMPORT_URL, import_url: Project::UNKNOWN_IMPORT_URL,
......
# 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
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