-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
954e045
commit 39d3e24
Showing
8 changed files
with
71 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
module Braintree | ||
module Version | ||
Major = 4 | ||
Minor = 1 | ||
Minor = 2 | ||
Tiny = 0 | ||
|
||
String = "#{Major}.#{Minor}.#{Tiny}" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
require File.expand_path(File.dirname(__FILE__) + "/../../spec_helper") | ||
|
||
describe Braintree::PaymentMethodNonce do | ||
let(:payment_method_nonce) { | ||
Braintree::PaymentMethodNonce._new( | ||
:gateway, | ||
:nonce => "some-nonce", | ||
:type => "CreditCard", | ||
:default => true, | ||
:details => { | ||
:bin => "some-bin" | ||
}, | ||
:three_d_secure_info => { | ||
:liability_shift_possible => false, | ||
:liability_shifted => false | ||
}, | ||
:bin_data => { | ||
:country_of_issuance => "USA" | ||
}, | ||
) | ||
} | ||
|
||
describe "#initialize" do | ||
it "sets attributes" do | ||
expect(payment_method_nonce.nonce).to eq("some-nonce") | ||
expect(payment_method_nonce.type).to eq("CreditCard") | ||
expect(payment_method_nonce.default).to be true | ||
expect(payment_method_nonce.details.bin).to eq("some-bin") | ||
expect(payment_method_nonce.three_d_secure_info.liability_shift_possible).to be false | ||
expect(payment_method_nonce.three_d_secure_info.liability_shifted).to be false | ||
expect(payment_method_nonce.bin_data.country_of_issuance).to eq("USA") | ||
end | ||
end | ||
|
||
describe "default" do | ||
it "is aliased to default?" do | ||
expect(payment_method_nonce.default?).to be true | ||
end | ||
end | ||
end |