test/stripe/stripe_client_test.rb in stripe-3.5.0 vs test/stripe/stripe_client_test.rb in stripe-3.5.1
- old
+ new
@@ -17,9 +17,18 @@
context ".default_client" do
should "be a StripeClient" do
assert_kind_of StripeClient, StripeClient.default_client
end
+
+ should "be a different client on each thread" do
+ other_thread_client = nil
+ thread = Thread.new do
+ other_thread_client = StripeClient.default_client
+ end
+ thread.join
+ refute_equal StripeClient.default_client, other_thread_client
+ end
end
context ".default_conn" do
should "be a Faraday::Connection" do
assert_kind_of Faraday::Connection, StripeClient.default_conn