Sha256: 5b4367fd56a581c8910903c198a5042f1f98d5b9d6ef9d01de57a9cf7b2c2ddf

Contents?: true

Size: 1.26 KB

Versions: 30

Compression:

Stored size: 1.26 KB

Contents

# frozen_string_literal: true

require ::File.expand_path("test_helper", __dir__)

class StripeTest < Test::Unit::TestCase
  should "allow app_info to be configured" do
    begin
      old = Stripe.app_info
      Stripe.set_app_info(
        "MyAwesomePlugin",
        partner_id: "partner_1234",
        url: "https://myawesomeplugin.info",
        version: "1.2.34"
      )
      assert_equal({
        name: "MyAwesomePlugin",
        partner_id: "partner_1234",
        url: "https://myawesomeplugin.info",
        version: "1.2.34",
      }, Stripe.app_info)
    ensure
      Stripe.app_info = old
    end
  end

  should "allow ca_bundle_path to be configured" do
    begin
      old = Stripe.ca_bundle_path
      Stripe.ca_bundle_path = "path/to/ca/bundle"
      assert_equal "path/to/ca/bundle", Stripe.ca_bundle_path
    ensure
      Stripe.ca_bundle_path = old
    end
  end

  should "allow max_network_retries to be configured" do
    begin
      old = Stripe.max_network_retries
      Stripe.max_network_retries = 99
      assert_equal 99, Stripe.max_network_retries
    ensure
      Stripe.max_network_retries = old
    end
  end

  should "have default open and read timeouts" do
    assert_equal Stripe.open_timeout, 30
    assert_equal Stripe.read_timeout, 80
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
stripe-5.23.1 test/stripe_test.rb
stripe-5.23.0 test/stripe_test.rb
stripe-5.22.0 test/stripe_test.rb
stripe-5.21.0 test/stripe_test.rb
stripe-5.20.0 test/stripe_test.rb
stripe-5.19.0 test/stripe_test.rb
stripe-5.18.0 test/stripe_test.rb
stripe-5.17.0 test/stripe_test.rb
stripe-5.16.0 test/stripe_test.rb
stripe-5.15.0 test/stripe_test.rb
stripe-5.14.0 test/stripe_test.rb
stripe-5.13.0 test/stripe_test.rb
stripe-5.12.1 test/stripe_test.rb
stripe-5.12.0 test/stripe_test.rb
stripe-5.11.0 test/stripe_test.rb
stripe-5.10.0 test/stripe_test.rb
stripe-5.9.0 test/stripe_test.rb
stripe-5.8.0 test/stripe_test.rb
stripe-5.7.1 test/stripe_test.rb
stripe-5.7.0 test/stripe_test.rb