Sha256: 225322014b9394b4c0548b23933bfe09a6a72ecd395e03e21953f69d8abd33e6
Contents?: true
Size: 805 Bytes
Versions: 3
Compression:
Stored size: 805 Bytes
Contents
require 'spec_helper' describe Direct::API::V5::ParamsBuilder do let(:input_params) do { criteria: { types: %w(TEXT_CAMPAIGN), states: %w(ON OFF) }, fields: [:id, :name, :state, :status, :status_payment], text_campaign_fields: [:counter_ids], page: { limit: 100, offset: 200 } } end let(:output_params) do { SelectionCriteria: { Types: %w(TEXT_CAMPAIGN), States: %w(ON OFF) }, FieldNames: [:Id, :Name, :State, :Status, :StatusPayment], TextCampaignFieldNames: [:CounterIds], Page: { Limit: 100, Offset: 200 } } end subject { described_class.new(input_params).build } it 'prepare params' do is_expected.to eq(output_params) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
direct-api-v5-0.1.2 | spec/direct/api/v5/params_builder_spec.rb |
direct-api-v5-0.1.1 | spec/direct/api/v5/params_builder_spec.rb |
direct-api-v5-0.1.0 | spec/direct/api/v5/params_builder_spec.rb |