Sha256: e644bf09eceaeb63f6fb72e74c01a7cadabb658d029148922a2e05adb8734a78
Contents?: true
Size: 545 Bytes
Versions: 4
Compression:
Stored size: 545 Bytes
Contents
describe Mrkt::Faraday::ParamsEncoder do describe '.encode' do let(:params) do { string: 'foobar', number: 1, boolean: true, array: [1, 2, 3] } end subject { described_class.encode(params) } it { is_expected.to eq(Faraday::Utils::ParamsHash.new.merge(params.merge(array: '1,2,3')).to_query) } end describe '.decode' do let(:value) { 'foo=foo&bar=bar' } subject { described_class.decode(value) } it { is_expected.to eq('foo' => 'foo', 'bar' => 'bar') } end end
Version data entries
4 entries across 4 versions & 1 rubygems