test/stripe/stripe_object_test.rb in stripe-1.32.0 vs test/stripe/stripe_object_test.rb in stripe-1.32.1

- old
+ new

@@ -103,9 +103,16 @@ should "#serialize_params on an empty object" do obj = Stripe::StripeObject.construct_from({}) assert_equal({}, Stripe::StripeObject.serialize_params(obj)) end + should "#serialize_params on a new object with a subobject" do + obj = Stripe::StripeObject.new + obj.metadata = { :foo => "bar" } + assert_equal({ :metadata => { :foo => "bar" } }, + Stripe::StripeObject.serialize_params(obj)) + end + should "#serialize_params on a basic object" do obj = Stripe::StripeObject.construct_from({ :foo => nil }) obj.update_attributes(:foo => "bar") assert_equal({ :foo => "bar" }, Stripe::StripeObject.serialize_params(obj)) end