spec/unit/braintree/transaction_spec.rb in braintree-2.36.0 vs spec/unit/braintree/transaction_spec.rb in braintree-2.37.0
- old
+ new
@@ -177,9 +177,17 @@
it "blows up if amount is not a string or BigDecimal" do
expect {
Braintree::Transaction._new(:gateway, :amount => 12.34)
}.to raise_error(/Argument must be a String or BigDecimal/)
end
+
+ it "handles nil risk_data" do
+ transaction = Braintree::Transaction._new(
+ :gateway,
+ :risk_data => nil
+ )
+ transaction.risk_data.should be_nil
+ end
end
describe "inspect" do
it "includes the id, type, amount, and status first" do
transaction = Braintree::Transaction._new(