Sha256: 1e27fc2d6d906e81d137bb1788712d1bcb3718934bc800140915addb3b7a812e

Contents?: true

Size: 416 Bytes

Versions: 4

Compression:

Stored size: 416 Bytes

Contents

require "spec_helper"

module ShipCompliant
  describe OrderSearch do

    context "to_h" do
      it "converts keys to pascal case" do
        order = OrderSearch.new(sales_order_key_min: 10)
        order.to_h.should == {
          "SalesOrderKeyMin" => 10
        }
      end

      it "ignores invalid keys" do
        order = OrderSearch.new(xyz: 5)
        order.to_h.should == {}
      end
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ship_compliant-0.2.0 spec/lib/ship_compliant/order_search_spec.rb
ship_compliant-0.1.2 spec/lib/ship_compliant/order_search_spec.rb
ship_compliant-0.1.1 spec/lib/ship_compliant/order_search_spec.rb
ship_compliant-0.1.0 spec/lib/ship_compliant/order_search_spec.rb