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