Sha256: db02e11e69254daa4bcdf56867f005abeb99ce375203a54e73385f98fee91667

Contents?: true

Size: 948 Bytes

Versions: 8

Compression:

Stored size: 948 Bytes

Contents

# encoding: UTF-8
#
# Copyright (c) 2010-2017 GoodData Corporation. All rights reserved.
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.

describe GoodData::LCM2::CollectUsersBrickUsers do
  let(:data_source) { double('data_source') }
  let(:users_csv) do
  end

  let(:params) do
    params = {
      users_brick_config: {
        input_source: {},
        login_column: 'Email'
      }
    }
    GoodData::LCM2.convert_to_smart_hash(params)
  end

  before do
    allow(GoodData::Helpers::DataSource).to receive(:new)
      .and_return(data_source)
    allow(data_source).to receive(:realize)
      .and_return('spec/data/users.csv')
  end

  it 'enriches parameters with logins' do
    result = subject.class.call(params)
    expect(result[:results].length).to eq(11)
    result[:results].each do |user|
      expect(user[:login]).not_to be_nil
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
gooddata-1.1.0-java spec/unit/actions/collect_users_brick_users_spec.rb
gooddata-1.1.0 spec/unit/actions/collect_users_brick_users_spec.rb
gooddata-1.0.2-java spec/unit/actions/collect_users_brick_users_spec.rb
gooddata-1.0.2 spec/unit/actions/collect_users_brick_users_spec.rb
gooddata-1.0.1 spec/unit/actions/collect_users_brick_users_spec.rb
gooddata-1.0.1-java spec/unit/actions/collect_users_brick_users_spec.rb
gooddata-1.0.0-java spec/unit/actions/collect_users_brick_users_spec.rb
gooddata-1.0.0 spec/unit/actions/collect_users_brick_users_spec.rb