Sha256: ac93c927981b9a728f297d03289d5c72acc8237cd250f0d609e60a3aa62bc048
Contents?: true
Size: 883 Bytes
Versions: 92
Compression:
Stored size: 883 Bytes
Contents
# frozen_string_literal: true require 'eac_ruby_utils/patches/addressable/uri/query_value' RSpec.describe ::Addressable::URI do subject(:instance) { described_class.parse('http://example.net') } it { expect(instance.query_values).to be_nil } it { expect(instance.hash_query_values).to eq({}) } it { expect(instance.query_value('param1')).to be_nil } it { expect(instance.query_value(:param1)).to be_nil } context 'when param is set' do let(:set_result) { instance.query_value(:param1, :value1) } before { set_result } it { expect(set_result).to eq(instance) } it { expect(instance.query_values).to eq({ 'param1' => 'value1' }) } it { expect(instance.hash_query_values).to eq({ 'param1' => 'value1' }) } it { expect(instance.query_value('param1')).to eq('value1') } it { expect(instance.query_value(:param1)).to eq('value1') } end end
Version data entries
92 entries across 92 versions & 1 rubygems