Welcome to mirror list, hosted at ThFree Co, Russian Federation.

project_creator_spec.rb « fogbugz_import « gitlab « lib « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6b8bb2229a969d93e6cf7f3d7f49624b96699575 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# frozen_string_literal: true

require 'spec_helper'

RSpec.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