spec/unit/braintree/credit_card_spec.rb in braintree-4.0.0 vs spec/unit/braintree/credit_card_spec.rb in braintree-4.1.0

- old
+ new

@@ -9,11 +9,11 @@ end end describe "self.create_signature" do it "should be what we expect" do - Braintree::CreditCardGateway._create_signature.should == [ + expect(Braintree::CreditCardGateway._create_signature).to match([ :billing_address_id, :cardholder_name, :cvv, :expiration_date, :expiration_month, @@ -22,11 +22,11 @@ :token, :venmo_sdk_payment_method_code, :device_data, :payment_method_nonce, {:external_vault=>[:network_transaction_id]}, - {:options => [:make_default, :verification_merchant_account_id, :verify_card, :verification_amount, :venmo_sdk_session, :fail_on_duplicate_payment_method, :verification_account_type, :verification_currency_iso_code]}, + {:options => match_array([:make_default, :skip_advanced_fraud_checking, :verification_merchant_account_id, :verify_card, :verification_amount, :venmo_sdk_session, :fail_on_duplicate_payment_method, :verification_account_type, :verification_currency_iso_code])}, {:billing_address => [ :company, :country_code_alpha2, :country_code_alpha3, :country_code_numeric, @@ -49,17 +49,17 @@ :directory_response, :cavv_algorithm, :ds_transaction_id, ]}, :customer_id, - ] + ]) end end describe "self.update_signature" do it "should be what we expect" do - Braintree::CreditCardGateway._update_signature.should == [ + expect(Braintree::CreditCardGateway._update_signature).to match([ :billing_address_id, :cardholder_name, :cvv, :expiration_date, :expiration_month, @@ -68,11 +68,11 @@ :token, :venmo_sdk_payment_method_code, :device_data, :payment_method_nonce, {:external_vault=>[:network_transaction_id]}, - {:options => [:make_default, :verification_merchant_account_id, :verify_card, :verification_amount, :venmo_sdk_session, :fail_on_duplicate_payment_method, :verification_account_type, :verification_currency_iso_code]}, + {:options => match_array([:make_default, :skip_advanced_fraud_checking, :verification_merchant_account_id, :verify_card, :verification_amount, :venmo_sdk_session, :fail_on_duplicate_payment_method, :verification_account_type, :verification_currency_iso_code])}, {:billing_address => [ :company, :country_code_alpha2, :country_code_alpha3, :country_code_numeric, @@ -95,10 +95,10 @@ :authentication_response, :directory_response, :cavv_algorithm, :ds_transaction_id, ]}, - ] + ]) end end describe "==" do it "returns true if given a credit card with the same token" do