Sha256: 502b8d8e282dd7571ce81f4ef0cb70718f7398d8d50ab977a8987761d3af46b7

Contents?: true

Size: 826 Bytes

Versions: 46

Compression:

Stored size: 826 Bytes

Contents

require 'support/test_data_builder'
require 'pact_broker/api/pact_broker_urls'

describe "Delete a verification" do
  let!(:verification) do
    TestDataBuilder.new
      .create_pact_with_verification("Foo", "1", "Bar", "2")
      .create_provider_webhook(event_names: ['provider_verification_published'])
      .create_triggered_webhook
      .create_webhook_execution
      .and_return(:verification)
  end

  let(:path) { PactBroker::Api::PactBrokerUrls.verification_url(verification, "") }
  let(:response_body) { JSON.parse(last_response.body, symbolize_names: true)}

  subject { delete(path) }

  it "deletes the verification" do
    expect { subject }.to change { PactBroker::Domain::Verification.count }.by(-1)
  end

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

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
pact_broker-2.65.0 spec/features/delete_verification_spec.rb
pact_broker-2.64.0 spec/features/delete_verification_spec.rb
pact_broker-2.63.0 spec/features/delete_verification_spec.rb
pact_broker-2.62.0 spec/features/delete_verification_spec.rb
pact_broker-2.61.0 spec/features/delete_verification_spec.rb
pact_broker-2.60.1 spec/features/delete_verification_spec.rb
pact_broker-2.60.0 spec/features/delete_verification_spec.rb
pact_broker-2.59.2 spec/features/delete_verification_spec.rb
pact_broker-2.59.1 spec/features/delete_verification_spec.rb
pact_broker-2.59.0 spec/features/delete_verification_spec.rb
pact_broker-2.58.3 spec/features/delete_verification_spec.rb
pact_broker-2.58.2 spec/features/delete_verification_spec.rb
pact_broker-2.58.0 spec/features/delete_verification_spec.rb
pact_broker-2.57.0 spec/features/delete_verification_spec.rb
pact_broker-2.56.1 spec/features/delete_verification_spec.rb
pact_broker-2.56.0 spec/features/delete_verification_spec.rb
pact_broker-2.55.0 spec/features/delete_verification_spec.rb
pact_broker-2.54.0 spec/features/delete_verification_spec.rb
pact_broker-2.53.0 spec/features/delete_verification_spec.rb
pact_broker-2.52.2 spec/features/delete_verification_spec.rb