Sha256: cd6daa3dad5b8a53057cc87db3992df9866280a735aff8f97ddeb0601a85f6e7

Contents?: true

Size: 581 Bytes

Versions: 9

Compression:

Stored size: 581 Bytes

Contents

require "spec_helper"

RSpec.describe Digicert::OrderCancellation do
  describe ".create" do
    it "cancels an existing order" do
      order_id = 123_456_789

      stub_digicert_order_cancellation_api(order_id, cancellation_attributes)
      order_cancellation = Digicert::OrderCancellation.create(
        order_id: order_id, **cancellation_attributes,
      )

      expect(order_cancellation.code.to_i).to eq(204)
    end
  end

  def cancellation_attributes
    {
      status: "CANCELED",
      send_emails: true,
      note: "This is a cancellation note",
    }
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
digicert-1.0.0 spec/digicert/order_cancellation_spec.rb
digicert-0.5.0 spec/digicert/order_cancellation_spec.rb
digicert-0.4.1 spec/digicert/order_cancellation_spec.rb
digicert-0.4.0 spec/digicert/order_cancellation_spec.rb
digicert-0.3.1 spec/digicert/order_cancellation_spec.rb
digicert-0.3.0 spec/digicert/order_cancellation_spec.rb
digicert-0.2.0 spec/digicert/order_cancellation_spec.rb
digicert-0.1.2 spec/digicert/order_cancellation_spec.rb
digicert-0.1.1 spec/digicert/order_cancellation_spec.rb