Sha256: 129daaf0ffa59b25f5c5742f703e0dd618292455b699518b1db23ed1fe056fba

Contents?: true

Size: 1.16 KB

Versions: 20

Compression:

Stored size: 1.16 KB

Contents

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

module Stripe
  class ApplePayDomainTest < Test::Unit::TestCase
    FIXTURE = API_FIXTURES.fetch(:apple_pay_domain)

    should "be listable" do
      domains = Stripe::ApplePayDomain.list
      assert_requested :get, "#{Stripe.api_base}/v1/apple_pay/domains"
      assert domains.data.kind_of?(Array)
      assert domains.data[0].kind_of?(Stripe::ApplePayDomain)
    end

    should "be retrievable" do
      domain = Stripe::ApplePayDomain.retrieve(FIXTURE[:id])
      assert_requested :get, "#{Stripe.api_base}/v1/apple_pay/domains/#{FIXTURE[:id]}"
      assert domain.kind_of?(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.kind_of?(Stripe::ApplePayDomain)
    end

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

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
stripe-3.0.3 test/stripe/apple_pay_domain_test.rb
stripe-3.0.1 test/stripe/apple_pay_domain_test.rb
stripe-3.0.0 test/stripe/apple_pay_domain_test.rb
stripe-2.12.0 test/stripe/apple_pay_domain_test.rb
stripe-2.11.0 test/stripe/apple_pay_domain_test.rb
stripe-2.10.0 test/stripe/apple_pay_domain_test.rb
stripe-2.9.0 test/stripe/apple_pay_domain_test.rb
stripe-2.8.0 test/stripe/apple_pay_domain_test.rb
stripe-2.7.0 test/stripe/apple_pay_domain_test.rb
stripe-2.6.0 test/stripe/apple_pay_domain_test.rb
stripe-2.5.0 test/stripe/apple_pay_domain_test.rb
stripe-2.4.0 test/stripe/apple_pay_domain_test.rb
stripe-2.3.0 test/stripe/apple_pay_domain_test.rb
stripe-2.2.1 test/stripe/apple_pay_domain_test.rb
stripe-2.2.0 test/stripe/apple_pay_domain_test.rb
stripe-2.1.0 test/stripe/apple_pay_domain_test.rb
stripe-2.0.3 test/stripe/apple_pay_domain_test.rb
stripe-2.0.2 test/stripe/apple_pay_domain_test.rb
stripe-2.0.1 test/stripe/apple_pay_domain_test.rb
stripe-2.0.0 test/stripe/apple_pay_domain_test.rb