Sha256: 84e165ec77a7ce24e823e5ee821a598af29e3d3c7125635d909b4d573e5fd98a

Contents?: true

Size: 515 Bytes

Versions: 7

Compression:

Stored size: 515 Bytes

Contents

# frozen_string_literal: true

RSpec.describe BingAdsRubySdk::Postprocessors::CastLongArrays do

  def action(params)
    described_class.new(params).call
  end

  it "casts and simplifies long arrays" do
    expect(action({
      long: "foo",
      bar_bar: {
        long: ['1', '2']
      },
      foos: [
        {
          bar: {
            long: ['3', '4']
          }
        }
      ]
    })).to eq({
      long: "foo",
      bar_bar: [1, 2],
      foos: [
        { bar: [3, 4] }
      ]
    })
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
bing_ads_ruby_sdk-1.3.4 spec/bing_ads_ruby_sdk/postprocessors/cast_long_arrays_spec.rb
bing_ads_ruby_sdk-1.3.3 spec/bing_ads_ruby_sdk/postprocessors/cast_long_arrays_spec.rb
bing_ads_ruby_sdk-1.3.2 spec/bing_ads_ruby_sdk/postprocessors/cast_long_arrays_spec.rb
bing_ads_ruby_sdk-1.3.1 spec/bing_ads_ruby_sdk/postprocessors/cast_long_arrays_spec.rb
bing_ads_ruby_sdk-1.3.0 spec/bing_ads_ruby_sdk/postprocessors/cast_long_arrays_spec.rb
bing_ads_ruby_sdk-1.2.0 spec/bing_ads_ruby_sdk/postprocessors/cast_long_arrays_spec.rb
bing_ads_ruby_sdk-1.1.1 spec/bing_ads_ruby_sdk/postprocessors/cast_long_arrays_spec.rb