spec/unit/braintree/configuration_spec.rb in braintree-2.22.0 vs spec/unit/braintree/configuration_spec.rb in braintree-2.23.0
- old
+ new
@@ -239,6 +239,14 @@
it "does not append anything if there is no custom_user_agent" do
Braintree::Configuration.custom_user_agent = nil
Braintree::Configuration.instantiate.user_agent.should == "Braintree Ruby Gem #{Braintree::Version::String}"
end
end
+
+ describe "inspect" do
+ it "masks the private_key" do
+ config = Braintree::Configuration.new(:private_key => "secret_key")
+ config.inspect.should include('@private_key="[FILTERED]"')
+ config.inspect.should_not include('secret_key')
+ end
+ end
end