Sha256: cef387cc4918b7bc4f6fbaa7805da70ea22898dfa6bcec1efa301f663a8b625a

Contents?: true

Size: 471 Bytes

Versions: 5

Compression:

Stored size: 471 Bytes

Contents

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 = described_class.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

5 entries across 5 versions & 1 rubygems

Version Path
lhc-3.5.4 spec/endpoint/remove_interpolated_params_spec.rb
lhc-3.5.3 spec/endpoint/remove_interpolated_params_spec.rb
lhc-3.5.2 spec/endpoint/remove_interpolated_params_spec.rb
lhc-3.5.1 spec/endpoint/remove_interpolated_params_spec.rb
lhc-3.5.0 spec/endpoint/remove_interpolated_params_spec.rb