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-10.1.1 spec/record/request_spec.rb
lhs-10.1.0 spec/record/request_spec.rb
lhs-10.0.0 spec/record/request_spec.rb
lhs-9.1.1 spec/record/request_spec.rb
lhs-9.1.0 spec/record/request_spec.rb
lhs-9.0.4 spec/record/request_spec.rb
lhs-9.0.3 spec/record/request_spec.rb
lhs-9.0.2 spec/record/request_spec.rb
lhs-9.0.1 spec/record/request_spec.rb
lhs-9.0.0 spec/record/request_spec.rb
lhs-8.0.0 spec/record/request_spec.rb
lhs-7.4.1 spec/record/request_spec.rb
lhs-7.4.0 spec/record/request_spec.rb
lhs-7.3.0 spec/record/request_spec.rb
lhs-7.2.5 spec/record/request_spec.rb
lhs-7.2.4 spec/record/request_spec.rb
lhs-7.2.3 spec/record/request_spec.rb
lhs-7.2.2 spec/record/request_spec.rb
lhs-7.2.1 spec/record/request_spec.rb
lhs-7.2.0 spec/record/request_spec.rb