Sha256: 7a6ebca0a44ec9673a9855dbcf37a2639a1f309f0008250ff18dd7fa736b5658

Contents?: true

Size: 873 Bytes

Versions: 42

Compression:

Stored size: 873 Bytes

Contents

require 'pact_broker/client/pacticipants/create'

module PactBroker
  module Client
    module Pacticipants2
      describe Create do
        describe ".call" do
          let(:pact_broker_client_options) { {} }
          let(:broker_base_url) { "http://url" }
          let(:params) { { name: 'Foo' } }

          subject { Create.call(params, broker_base_url, pact_broker_client_options)}

          context "when there is an http error" do
            let!(:index_request) do
              stub_request(:get, broker_base_url).to_return(status: 500, body: 'some error', headers: { "Content-Type" => "application/hal+json" }  )
            end

            it "returns a failure result" do
              expect(subject.success).to be false
              expect(subject.message).to include 'some error'
            end
          end
        end
      end
    end
  end
end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
pact_broker-client-1.38.3 spec/lib/pact_broker/client/pacticipants/create_spec.rb
pact_broker-client-1.38.2 spec/lib/pact_broker/client/pacticipants/create_spec.rb
pact_broker-client-1.38.1 spec/lib/pact_broker/client/pacticipants/create_spec.rb
pact_broker-client-1.38.0 spec/lib/pact_broker/client/pacticipants/create_spec.rb
pact_broker-client-1.37.1 spec/lib/pact_broker/client/pacticipants/create_spec.rb
pact_broker-client-1.37.0 spec/lib/pact_broker/client/pacticipants/create_spec.rb
pact_broker-client-1.36.0 spec/lib/pact_broker/client/pacticipants/create_spec.rb
pact_broker-client-1.35.0 spec/lib/pact_broker/client/pacticipants/create_spec.rb
pact_broker-client-1.34.0 spec/lib/pact_broker/client/pacticipants/create_spec.rb
pact_broker-client-1.33.0 spec/lib/pact_broker/client/pacticipants/create_spec.rb
pact_broker-client-1.32.0 spec/lib/pact_broker/client/pacticipants/create_spec.rb
pact_broker-client-1.31.0 spec/lib/pact_broker/client/pacticipants/create_spec.rb
pact_broker-client-1.30.0 spec/lib/pact_broker/client/pacticipants/create_spec.rb
pact_broker-client-1.29.1 spec/lib/pact_broker/client/pacticipants/create_spec.rb
pact_broker-client-1.29.0 spec/lib/pact_broker/client/pacticipants/create_spec.rb
pact_broker-client-1.28.4 spec/lib/pact_broker/client/pacticipants/create_spec.rb
pact_broker-client-1.28.3 spec/lib/pact_broker/client/pacticipants/create_spec.rb
pact_broker-client-1.28.2 spec/lib/pact_broker/client/pacticipants/create_spec.rb
pact_broker-client-1.28.1 spec/lib/pact_broker/client/pacticipants/create_spec.rb
pact_broker-client-1.28.0 spec/lib/pact_broker/client/pacticipants/create_spec.rb