Sha256: 66cdd4de66b61ee3321a486d5a81635cefb676c563cf1046c8769b5d73585c9d

Contents?: true

Size: 1.08 KB

Versions: 20

Compression:

Stored size: 1.08 KB

Contents

require File.expand_path("../../test_helper", __FILE__)

module Stripe
  class ApplePayDomainTest < Test::Unit::TestCase
    should "be listable" do
      domains = Stripe::ApplePayDomain.list
      assert_requested :get, "#{Stripe.api_base}/v1/apple_pay/domains"
      assert domains.data.is_a?(Array)
      assert domains.data[0].is_a?(Stripe::ApplePayDomain)
    end

    should "be retrievable" do
      domain = Stripe::ApplePayDomain.retrieve("apwc_123")
      assert_requested :get, "#{Stripe.api_base}/v1/apple_pay/domains/apwc_123"
      assert domain.is_a?(Stripe::ApplePayDomain)
    end

    should "be creatable" do
      domain = Stripe::ApplePayDomain.create(domain_name: "example.com")
      assert_requested :post, "#{Stripe.api_base}/v1/apple_pay/domains"
      assert domain.is_a?(Stripe::ApplePayDomain)
    end

    should "be deletable" do
      domain = Stripe::ApplePayDomain.retrieve("apwc_123")
      domain = domain.delete
      assert_requested :delete, "#{Stripe.api_base}/v1/apple_pay/domains/#{domain.id}"
      assert domain.is_a?(Stripe::ApplePayDomain)
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
stripe-3.14.0 test/stripe/apple_pay_domain_test.rb
stripe-3.13.1 test/stripe/apple_pay_domain_test.rb
stripe-3.13.0 test/stripe/apple_pay_domain_test.rb
stripe-3.12.1 test/stripe/apple_pay_domain_test.rb
stripe-3.12.0 test/stripe/apple_pay_domain_test.rb
stripe-3.11.0 test/stripe/apple_pay_domain_test.rb
stripe-3.10.0 test/stripe/apple_pay_domain_test.rb
stripe-3.9.2 test/stripe/apple_pay_domain_test.rb
stripe-3.9.1 test/stripe/apple_pay_domain_test.rb
stripe-3.9.0 test/stripe/apple_pay_domain_test.rb
stripe-3.8.2 test/stripe/apple_pay_domain_test.rb
stripe-3.8.1 test/stripe/apple_pay_domain_test.rb
stripe-3.8.0 test/stripe/apple_pay_domain_test.rb
stripe-3.7.0 test/stripe/apple_pay_domain_test.rb
stripe-3.6.0 test/stripe/apple_pay_domain_test.rb
stripe-3.5.3 test/stripe/apple_pay_domain_test.rb
stripe-3.5.2 test/stripe/apple_pay_domain_test.rb
stripe-3.5.1 test/stripe/apple_pay_domain_test.rb
stripe-3.5.0 test/stripe/apple_pay_domain_test.rb
stripe-3.4.1 test/stripe/apple_pay_domain_test.rb