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.79.1 spec/features/delete_verification_spec.rb
pact_broker-2.79.0 spec/features/delete_verification_spec.rb
pact_broker-2.78.1 spec/features/delete_verification_spec.rb
pact_broker-2.78.0 spec/features/delete_verification_spec.rb
pact_broker-2.77.0 spec/features/delete_verification_spec.rb
pact_broker-2.76.2 spec/features/delete_verification_spec.rb
pact_broker-2.76.1 spec/features/delete_verification_spec.rb
pact_broker-2.76.0 spec/features/delete_verification_spec.rb
pact_broker-2.75.0 spec/features/delete_verification_spec.rb
pact_broker-2.74.1 spec/features/delete_verification_spec.rb
pact_broker-2.74.0 spec/features/delete_verification_spec.rb
pact_broker-2.73.0 spec/features/delete_verification_spec.rb
pact_broker-2.72.0 spec/features/delete_verification_spec.rb
pact_broker-2.71.0 spec/features/delete_verification_spec.rb
pact_broker-2.70.0 spec/features/delete_verification_spec.rb
pact_broker-2.69.0 spec/features/delete_verification_spec.rb
pact_broker-2.68.1 spec/features/delete_verification_spec.rb
pact_broker-2.68.0 spec/features/delete_verification_spec.rb
pact_broker-2.67.0 spec/features/delete_verification_spec.rb
pact_broker-2.66.0 spec/features/delete_verification_spec.rb