Sha256: f6b3460a00d3a8e7d046bf485fafd6ee0a498a5183d9f1e18fffa7cd60716bb7

Contents?: true

Size: 745 Bytes

Versions: 45

Compression:

Stored size: 745 Bytes

Contents

require 'support/test_data_builder'

describe "Delete a webhook" do

  let!(:webhook) do
    TestDataBuilder.new
      .create_consumer("Some Consumer")
      .create_consumer_version("Some Provider")
      .create_provider
      .create_pact
      .create_webhook
      .create_triggered_webhook
      .and_return(:webhook)
  end

  let(:path) { "/webhooks/#{webhook.uuid}" }
  let(:response_body) { JSON.parse(last_response.body, symbolize_names: true)}
  let(:webhook_json) { webhook_hash.to_json }

  subject { delete path }

  it "deletes the webhook" do
    expect { subject }.to change { PactBroker::Webhooks::Webhook.count }.by(-1)
  end

  it "returns a 204 response" do
    subject
    expect(last_response.status).to eq 204
  end
end

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
pact_broker-2.79.1 spec/features/delete_webhook_spec.rb
pact_broker-2.79.0 spec/features/delete_webhook_spec.rb
pact_broker-2.78.1 spec/features/delete_webhook_spec.rb
pact_broker-2.78.0 spec/features/delete_webhook_spec.rb
pact_broker-2.77.0 spec/features/delete_webhook_spec.rb
pact_broker-2.76.2 spec/features/delete_webhook_spec.rb
pact_broker-2.76.1 spec/features/delete_webhook_spec.rb
pact_broker-2.76.0 spec/features/delete_webhook_spec.rb
pact_broker-2.75.0 spec/features/delete_webhook_spec.rb
pact_broker-2.74.1 spec/features/delete_webhook_spec.rb
pact_broker-2.74.0 spec/features/delete_webhook_spec.rb
pact_broker-2.73.0 spec/features/delete_webhook_spec.rb
pact_broker-2.72.0 spec/features/delete_webhook_spec.rb
pact_broker-2.71.0 spec/features/delete_webhook_spec.rb
pact_broker-2.70.0 spec/features/delete_webhook_spec.rb
pact_broker-2.69.0 spec/features/delete_webhook_spec.rb
pact_broker-2.68.1 spec/features/delete_webhook_spec.rb
pact_broker-2.68.0 spec/features/delete_webhook_spec.rb
pact_broker-2.67.0 spec/features/delete_webhook_spec.rb
pact_broker-2.66.0 spec/features/delete_webhook_spec.rb