Sha256: 3850026c6da50bd3d930581a332d00331773e16bf30cab18d39d806660598002

Contents?: true

Size: 691 Bytes

Versions: 13

Compression:

Stored size: 691 Bytes

Contents

# frozen_string_literal: true

require 'rails_helper'

describe LHS::Record do
  context 'misconfiguration of endpoints' do
    it 'fails trying to add ambiguous endpoints' do
      expect(
        lambda {
          class Record < LHS::Record
            endpoint '{+datastore}/v2/feedbacks'
            endpoint '{+datastore}/v2/reviews'
          end
        }
      ).to raise_error(/Ambiguous endpoints/)

      expect(
        lambda {
          class Record < LHS::Record
            endpoint '{+datastore}/v2/{campaign_id}/feedbacks'
            endpoint '{+datastore}/v2/{campaign_id}/reviews'
          end
        }
      ).to raise_error(/Ambiguous endpoints/)
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
lhs-19.0.2 spec/record/endpoint_misconfiguration_spec.rb
lhs-19.0.1 spec/record/endpoint_misconfiguration_spec.rb
lhs-19.0.0 spec/record/endpoint_misconfiguration_spec.rb
lhs-19.0.0.pre.endpoint.1 spec/record/endpoint_misconfiguration_spec.rb
lhs-18.0.3 spec/record/endpoint_misconfiguration_spec.rb
lhs-18.0.2 spec/record/endpoint_misconfiguration_spec.rb
lhs-18.0.1 spec/record/endpoint_misconfiguration_spec.rb
lhs-18.0.0 spec/record/endpoint_misconfiguration_spec.rb
lhs-17.0.1 spec/record/endpoint_misconfiguration_spec.rb
lhs-17.0.1.pre1 spec/record/endpoint_misconfiguration_spec.rb
lhs-18.0.0.pre.pre1 spec/record/endpoint_misconfiguration_spec.rb
lhs-17.0.0 spec/record/endpoint_misconfiguration_spec.rb
lhs-16.1.6 spec/record/endpoint_misconfiguration_spec.rb