Sha256: ba848b27b32c23e65671b07e0a40ed10e7040755b8736e555d9bf4dc79a52af5

Contents?: true

Size: 488 Bytes

Versions: 2

Compression:

Stored size: 488 Bytes

Contents

describe 'proxying calls' do
  include_context :site_hub
  include_context :async

  describe 'supported HTTP verbs' do

    before do
      WebMock.enable!
    end

    let(:app){async_middleware.new(rack_application)}

    %i(get post put delete).each do |verb|
      it "forwards the downstream" do
        stub_request(verb, downstream_url).to_return(:body => 'hello')
        send(verb, '/endpoint')
        expect(app.last_response.body).to eq(['hello'])
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sitehub-0.4.2 spec/sitehub/integration_spec.rb
sitehub-0.4.1 spec/sitehub/integration_spec.rb