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

users_response_spec.rb « conduit « phabricator_import « gitlab « lib « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ebbb2c0598c7693d4b7e51ba27417438a48b03f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# frozen_string_literal: true
require 'spec_helper'

RSpec.describe Gitlab::PhabricatorImport::Conduit::UsersResponse do
  let(:conduit_response) do
    Gitlab::PhabricatorImport::Conduit::Response
      .new(Gitlab::Json.parse(fixture_file('phabricator_responses/user.search.json')))
  end

  subject(:response) { described_class.new(conduit_response) }

  describe '#users' do
    it 'builds the correct users representation' do
      tasks = response.users

      usernames = tasks.map(&:username)

      expect(usernames).to contain_exactly('jane', 'john')
    end
  end
end