Sha256: 182d5439badd2b9af3c22c557f5aea21296baed83835c0980fd29aeadaaf505b

Contents?: true

Size: 503 Bytes

Versions: 49

Compression:

Stored size: 503 Bytes

Contents

# frozen_string_literal: true

require 'rails_helper'

describe LHC::Endpoint do
  it 'removes params used for interpolation' do
    params = {
      datastore: 'http://datastore',
      campaign_id: 'abc',
      has_reviews: true
    }
    endpoint = LHC::Endpoint.new('{+datastore}/v2/{campaign_id}/feedbacks')
    removed = endpoint.remove_interpolated_params!(params)
    expect(params).to eq(has_reviews: true)
    expect(removed).to eq(datastore: 'http://datastore', campaign_id: 'abc')
  end
end

Version data entries

49 entries across 49 versions & 1 rubygems

Version Path
lhc-15.2.1 spec/endpoint/remove_interpolated_params_spec.rb
lhc-15.2.0 spec/endpoint/remove_interpolated_params_spec.rb
lhc-15.1.3 spec/endpoint/remove_interpolated_params_spec.rb
lhc-15.1.2 spec/endpoint/remove_interpolated_params_spec.rb
lhc-15.1.1 spec/endpoint/remove_interpolated_params_spec.rb
lhc-15.1.0 spec/endpoint/remove_interpolated_params_spec.rb
lhc-16.0.0.pre.pro2162.2 spec/endpoint/remove_interpolated_params_spec.rb
lhc-16.0.0.pre.pro2162 spec/endpoint/remove_interpolated_params_spec.rb
lhc-15.0.1 spec/endpoint/remove_interpolated_params_spec.rb
lhc-15.0.0 spec/endpoint/remove_interpolated_params_spec.rb
lhc-14.0.0 spec/endpoint/remove_interpolated_params_spec.rb
lhc-13.4.0.pre.pro1766.1 spec/endpoint/remove_interpolated_params_spec.rb
lhc-13.2.0 spec/endpoint/remove_interpolated_params_spec.rb
lhc-13.1.0 spec/endpoint/remove_interpolated_params_spec.rb
lhc-13.0.0 spec/endpoint/remove_interpolated_params_spec.rb
lhc-12.3.0 spec/endpoint/remove_interpolated_params_spec.rb
lhc-12.2.1 spec/endpoint/remove_interpolated_params_spec.rb
lhc-12.2.0 spec/endpoint/remove_interpolated_params_spec.rb
lhc-12.1.3 spec/endpoint/remove_interpolated_params_spec.rb
lhc-12.1.2 spec/endpoint/remove_interpolated_params_spec.rb