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

fogbugz_provider_repo_entity_spec.rb « import « serializers « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b9029b67aabd5bd7bc14f556d6b0941c24011364 (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
# frozen_string_literal: true

require 'spec_helper'

describe Import::FogbugzProviderRepoEntity do
  let(:provider_url) { 'https://demo.fogbugz.com/' }
  let(:repo_data) do
    {
      'ixProject' => 'foo',
      'sProject' => 'demo'
    }
  end
  let(:repo) { Gitlab::FogbugzImport::Repository.new(repo_data) }

  subject { described_class.represent(repo, { provider_url: provider_url }).as_json }

  it_behaves_like 'exposes required fields for import entity' do
    let(:expected_values) do
      {
        id: 'foo',
        full_name: 'demo',
        sanitized_name: 'demo',
        provider_link: 'https://demo.fogbugz.com/demo'
      }
    end
  end
end