spec/balanced/resources/hold_spec.rb in balanced-0.3.11 vs spec/balanced/resources/hold_spec.rb in balanced-0.5.1
- old
+ new
@@ -9,18 +9,21 @@
card = Balanced::Card.new(
:card_number => "5105105105105100",
:expiration_month => "12",
:expiration_year => "2015"
).save
- @buyer = @marketplace.create_buyer("buyer@example.org", card.uri)
+ @buyer = @marketplace.create_buyer(
+ :email_address => 'buyer@example.org',
+ :card_uri => card.uri,
+ )
end
describe "#void" do
use_vcr_cassette
before do
- @hold = @buyer.hold 100
+ @hold = @buyer.hold :amount => 100
end
describe 'before' do
use_vcr_cassette
subject { @hold.is_void }
@@ -36,19 +39,17 @@
end
describe 'when exception is thrown' do
use_vcr_cassette
before do
- @hold = @buyer.hold 150
+ @hold = @buyer.hold :amount => 150
@debit = @hold.capture
end
it "should not change void state since its captured" do
lambda { @hold.void }.should raise_error(Balanced::Conflict)
@hold.is_void.should be_false
end
- # void here.
-
end
end
end