summaryrefslogtreecommitdiff
path: root/spec/serializers/import/fogbugz_provider_repo_entity_spec.rb
blob: 748ddd2a108aa251b293f104389f6e85fe7cb542 (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'

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