spec/integration/braintree/credit_card_spec.rb in braintree-2.23.0 vs spec/integration/braintree/credit_card_spec.rb in braintree-2.24.0
- old
+ new
@@ -25,9 +25,21 @@
credit_card.unique_number_identifier.should =~ /\A\w{32}\z/
credit_card.venmo_sdk?.should == false
credit_card.image_url.should_not be_nil
end
+ it "supports creation of cards with security params" do
+ customer = Braintree::Customer.create!
+ result = Braintree::CreditCard.create(
+ :customer_id => customer.id,
+ :number => Braintree::Test::CreditCardNumbers::Visa,
+ :expiration_date => "05/2009",
+ :cvv => "100",
+ :device_session_id => "abc123"
+ )
+ result.success?.should == true
+ end
+
it "can provide expiration month and year separately" do
customer = Braintree::Customer.create!
result = Braintree::CreditCard.create(
:customer_id => customer.id,
:number => Braintree::Test::CreditCardNumbers::Visa,