diff options
author | George Koltsov <koltsov.george@gmail.com> | 2019-08-26 19:19:47 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2019-08-26 19:19:47 +0300 |
commit | 679e9cd1a5f67d27b26c6037864ed42e03a3b5d2 (patch) | |
tree | 32f371af9272133d2a8c78a361dcdd2b550e4ae0 /spec/lib/gitlab/fogbugz_import | |
parent | 336ef2a98cf74b0a49474816031657efbe14f3b2 (diff) |
Change default visibility level for FogBugz imported projects to Private
Diffstat (limited to 'spec/lib/gitlab/fogbugz_import')
-rw-r--r-- | spec/lib/gitlab/fogbugz_import/project_creator_spec.rb | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/spec/lib/gitlab/fogbugz_import/project_creator_spec.rb b/spec/lib/gitlab/fogbugz_import/project_creator_spec.rb new file mode 100644 index 00000000000..503fe897e29 --- /dev/null +++ b/spec/lib/gitlab/fogbugz_import/project_creator_spec.rb @@ -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 |