Sha256: 37f3b1fdf2823973dcb154d35255b15e818f760822358f95c0f23268ba5b165d
Contents?: true
Size: 861 Bytes
Versions: 9
Compression:
Stored size: 861 Bytes
Contents
require 'rails_helper' describe LHS::Endpoint do context 'for url' do before(:each) do class SomeService < LHS::Service endpoint ':datastore/entries/:entry_id/content-ads/:campaign_id/feedbacks' endpoint ':datastore/:campaign_id/feedbacks' endpoint ':datastore/feedbacks' end end it 'provides the endpoint for a given url' do expect( LHS::Endpoint.for_url('http://datastore.local.ch/v2/entries/123/content-ads/456/feedbacks').url ).to eq ':datastore/entries/:entry_id/content-ads/:campaign_id/feedbacks' expect( LHS::Endpoint.for_url('http://datastore.local.ch/123/feedbacks').url ).to eq ':datastore/:campaign_id/feedbacks' expect( LHS::Endpoint.for_url('http://datastore.local.ch/feedbacks').url ).to eq ':datastore/feedbacks' end end end
Version data entries
9 entries across 9 versions & 1 rubygems