Commit 94490b63 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'georgekoltsov/54023-fogbugz-visibility-level' into 'master'

Change default visibility level for FogBugz imported projects to Private

See merge request gitlab-org/gitlab-ce!32142
parents 336ef2a9 679e9cd1
---
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,
......
# 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