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

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

require 'spec_helper'

RSpec.describe Gitlab::PhabricatorImport::Representation::User do
  subject(:user) do
    described_class.new(
      {
        'phid' => 'the-phid',
        'fields' => {
          'username' => 'the-username'
        }
      }
    )
  end

  describe '#phabricator_id' do
    it 'returns the phabricator id' do
      expect(user.phabricator_id).to eq('the-phid')
    end
  end

  describe '#username' do
    it 'returns the username' do
      expect(user.username).to eq('the-username')
    end
  end
end