Sha256: 4e18ced3763be150dcf5797f800434fce0eb88d5f46cc19cccec51d8de65e19c

Contents?: true

Size: 1.08 KB

Versions: 4

Compression:

Stored size: 1.08 KB

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.

require 'gooddata/lcm/lcm2'

describe 'GoodData::LCM2' do
  describe '#skip_actions' do
    let(:client) { double(:client) }
    let(:domain) { double(:domain) }
    let(:logger) { double(:logger) }
    let(:params) do
      params = {
        skip_actions: %w(CollectSegments SynchronizeUsers),
        GDC_GD_CLIENT: client,
        GDC_LOGGER: logger
      }
      GoodData::LCM2.convert_to_smart_hash(params)
    end

    before do
      allow(client).to receive(:class) { GoodData::Rest::Client }
      allow(client).to receive(:domain) { domain }
      allow(logger).to receive(:info)
      allow(domain).to receive(:data_products)
    end

    it 'skips actions in skip_actions' do
      expect(GoodData::LCM2::CollectSegments).not_to receive(:call)
      expect(GoodData::LCM2::SynchronizeUsers).not_to receive(:call)
      GoodData::LCM2.perform('users', params)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
gooddata-1.0.2-java spec/unit/lcm/lcm2_spec.rb
gooddata-1.0.2 spec/unit/lcm/lcm2_spec.rb
gooddata-1.0.1 spec/unit/lcm/lcm2_spec.rb
gooddata-1.0.1-java spec/unit/lcm/lcm2_spec.rb