Sha256: 935b6c46b73047e379b5c6f11fadaee602c76f1ebeb700122feb29dda75c34e4

Contents?: true

Size: 907 Bytes

Versions: 15

Compression:

Stored size: 907 Bytes

Contents

require 'rails_helper'

describe LHC::Endpoint do
  context 'placeholders' do
    it 'returns all placeholders alphabetically sorted' do
      endpoint = LHC::Endpoint.new(':datastore/v2/:campaign_id/feedbacks')
      expect(
        endpoint.placeholders
      ).to eq [':campaign_id', ':datastore']
    end

    it 'allows basic auth token in url, like used on github' do
      stub_request(:get, "https://d123token:@api.github.com/search")
        .to_return(body: {}.to_json)
      expect(->{
        LHC.get("https://d123token:@api.github.com/search")
      }).not_to raise_error
    end

    it 'allows complete basic auth (username password) in url, like used for the gemserer' do
      stub_request(:get, "https://name:password@gemserver.com")
        .to_return(body: {}.to_json)
      expect(->{
        LHC.get("https://name:password@gemserver.com")
      }).not_to raise_error
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
lhc-6.7.2 spec/endpoint/placeholders_spec.rb
lhc-6.7.1 spec/endpoint/placeholders_spec.rb
lhc-6.7.0 spec/endpoint/placeholders_spec.rb
lhc-6.6.0.zipkin.pre.03 spec/endpoint/placeholders_spec.rb
lhc-6.6.0.zipkin.pre.02 spec/endpoint/placeholders_spec.rb
lhc-6.6.0.zipkin.pre.01 spec/endpoint/placeholders_spec.rb
lhc-6.6.0.zipkin.pre spec/endpoint/placeholders_spec.rb
lhc-6.6.0 spec/endpoint/placeholders_spec.rb
lhc-6.5.0 spec/endpoint/placeholders_spec.rb
lhc-6.4.0 spec/endpoint/placeholders_spec.rb
lhc-6.3.1 spec/endpoint/placeholders_spec.rb
lhc-6.3.0 spec/endpoint/placeholders_spec.rb
lhc-6.2.0 spec/endpoint/placeholders_spec.rb
lhc-6.1.3 spec/endpoint/placeholders_spec.rb
lhc-6.1.2 spec/endpoint/placeholders_spec.rb