Sha256: bd4b27943a93f724593042cbc2453c3355ca2c3a85338ab44c6babb24227346c

Contents?: true

Size: 633 Bytes

Versions: 83

Compression:

Stored size: 633 Bytes

Contents

require 'rails_helper'

describe LHS::Record do
  context 'url pattern' do
    let(:datastore) { 'http://local.ch/v2' }

    before(:each) do
      LHC.config.placeholder(:datastore, datastore)
      class Record < LHS::Record
        endpoint ':datastore/content-ads/:campaign_id/feedbacks'
        endpoint ':datastore/feedbacks'
      end
    end

    it 'is using params as query params explicitly when provided in params namespace' do
      stub_request(:get, "#{datastore}/content-ads/123/feedbacks?campaign_id=456").to_return(status: 200)
      Record.where(campaign_id: 123, params: { campaign_id: '456' })
    end
  end
end

Version data entries

83 entries across 83 versions & 1 rubygems

Version Path
lhs-7.1.0 spec/record/request_spec.rb
lhs-7.0.3 spec/record/request_spec.rb
lhs-7.0.2 spec/record/request_spec.rb
lhs-7.0.1 spec/record/request_spec.rb
lhs-7.0.0 spec/record/request_spec.rb
lhs-6.8.2 spec/record/request_spec.rb
lhs-6.8.1 spec/record/request_spec.rb
lhs-6.8.0 spec/record/request_spec.rb
lhs-6.7.2 spec/record/request_spec.rb
lhs-6.7.1 spec/record/request_spec.rb
lhs-6.7.0 spec/record/request_spec.rb
lhs-6.6.2 spec/record/request_spec.rb
lhs-6.6.1 spec/record/request_spec.rb
lhs-6.6.0 spec/record/request_spec.rb
lhs-6.5.0 spec/record/request_spec.rb
lhs-6.4.0 spec/record/request_spec.rb
lhs-6.3.1 spec/record/request_spec.rb
lhs-6.3.0 spec/record/request_spec.rb
lhs-6.2.0 spec/record/request_spec.rb
lhs-6.1.0 spec/record/request_spec.rb