Sha256: 3081ae2d2677cdd156c4f6c1f74e684a6ca0b9815e9710d5acbb5951deda6778

Contents?: true

Size: 656 Bytes

Versions: 7

Compression:

Stored size: 656 Bytes

Contents

# frozen_string_literal: true

RSpec.describe BingAdsRubySdk::Preprocessors::Camelize do

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

  it "changes keys to camelize version" do
    expect(action({
      foo: "foo",
      bar_bar: {
        baz_baz: "baz"
      },
      coucou: [
        {
          bisou: 1
        }
      ]
    })).to eq({
      "Foo" => "foo",
      "BarBar" => {
        "BazBaz" => "baz"
      },
      "Coucou" => [
        {
          "Bisou" => 1
        }
      ]
    })
  end

  it "doesnt camelize 'long' tag name" do
    expect(action({
      long: "1"
    })).to eq({
      "long" => "1"
    })
  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/preprocessors/camelize_spec.rb
bing_ads_ruby_sdk-1.3.3 spec/bing_ads_ruby_sdk/preprocessors/camelize_spec.rb
bing_ads_ruby_sdk-1.3.2 spec/bing_ads_ruby_sdk/preprocessors/camelize_spec.rb
bing_ads_ruby_sdk-1.3.1 spec/bing_ads_ruby_sdk/preprocessors/camelize_spec.rb
bing_ads_ruby_sdk-1.3.0 spec/bing_ads_ruby_sdk/preprocessors/camelize_spec.rb
bing_ads_ruby_sdk-1.2.0 spec/bing_ads_ruby_sdk/preprocessors/camelize_spec.rb
bing_ads_ruby_sdk-1.1.1 spec/bing_ads_ruby_sdk/preprocessors/camelize_spec.rb