spec/unit/braintree/customer_spec.rb in braintree-4.0.0 vs spec/unit/braintree/customer_spec.rb in braintree-4.1.0
- old
+ new
@@ -74,11 +74,11 @@
end
end
describe "self.create_signature" do
it "should be what we expect" do
- Braintree::CustomerGateway._create_signature.should == [
+ expect(Braintree::CustomerGateway._create_signature).to match([
:company,
:email,
:fax,
:first_name,
:id,
@@ -99,11 +99,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,
@@ -161,17 +161,17 @@
:street_address,
]}
]]
},
{:custom_fields => :_any_key_}
- ]
+ ])
end
end
describe "self.update_signature" do
it "should be what we expect" do
- Braintree::CustomerGateway._update_signature.should == [
+ expect(Braintree::CustomerGateway._update_signature).to match([
:company,
:email,
:fax,
:first_name,
:id,
@@ -192,21 +192,22 @@
:token,
:venmo_sdk_payment_method_code,
:device_data,
:payment_method_nonce,
{:external_vault=>[:network_transaction_id]},
- {:options => [
+ {: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,
:update_existing_token
- ]},
+ ])},
{:billing_address => [
:company,
:country_code_alpha2,
:country_code_alpha3,
:country_code_numeric,
@@ -259,10 +260,10 @@
:street_address,
]}
]]
},
{:custom_fields => :_any_key_}
- ]
+ ])
end
end
describe "==" do
it "returns true when given a customer with the same id" do