Sha256: f33d3337db3cb7a673cb2181cf1aab39a5903260bf17f8b0562377419b7a739d
Contents?: true
Size: 954 Bytes
Versions: 37
Compression:
Stored size: 954 Bytes
Contents
require 'spec_helper' require 'pact_broker/domain/webhook' module PactBroker module Domain describe Webhook do let(:consumer) { Pacticipant.new(name: 'Consumer')} let(:provider) { Pacticipant.new(name: 'Provider')} let(:request) { instance_double(PactBroker::Domain::WebhookRequest, execute: nil)} subject { Webhook.new(request: request, consumer: consumer, provider: provider,) } describe "description" do it "returns a description of the webhook" do expect(subject.description).to eq "A webhook for the pact between Consumer and Provider" end end describe "execute" do it "executes the request" do expect(request).to receive(:execute) subject.execute end it "logs before and after" do expect(PactBroker.logger).to receive(:info).with(/Executing/) subject.execute end end end end end
Version data entries
37 entries across 37 versions & 1 rubygems