balanced 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CONTRIBUTORS +2 -1
- data/lib/balanced/resources/hold.rb +1 -1
- data/lib/balanced/version.rb +1 -1
- data/spec/balanced/resources/hold_spec.rb +39 -0
- metadata +4 -2
data/CONTRIBUTORS
CHANGED
data/lib/balanced/version.rb
CHANGED
@@ -0,0 +1,39 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Balanced::Hold do
|
4
|
+
use_vcr_cassette
|
5
|
+
before do
|
6
|
+
api_key = Balanced::ApiKey.new.save
|
7
|
+
Balanced.configure api_key.secret
|
8
|
+
@marketplace = Balanced::Marketplace.new.save
|
9
|
+
card = Balanced::Card.new(
|
10
|
+
:card_number => "5105105105105100",
|
11
|
+
:expiration_month => "12",
|
12
|
+
:expiration_year => "2015"
|
13
|
+
).save
|
14
|
+
@buyer = @marketplace.create_buyer("buyer@example.org", card.uri)
|
15
|
+
end
|
16
|
+
|
17
|
+
describe "#void" do
|
18
|
+
use_vcr_cassette
|
19
|
+
|
20
|
+
before do
|
21
|
+
@hold = @buyer.hold 100
|
22
|
+
end
|
23
|
+
|
24
|
+
describe 'before' do
|
25
|
+
use_vcr_cassette
|
26
|
+
subject { @hold.is_void }
|
27
|
+
it { should be_false }
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'after' do
|
31
|
+
use_vcr_cassette
|
32
|
+
before { @hold.void }
|
33
|
+
|
34
|
+
subject { @hold.is_void }
|
35
|
+
it { should be_true }
|
36
|
+
end
|
37
|
+
|
38
|
+
end
|
39
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: balanced
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-06-
|
12
|
+
date: 2012-06-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: faraday
|
@@ -156,6 +156,7 @@ files:
|
|
156
156
|
- lib/balanced/version.rb
|
157
157
|
- spec/balanced/resources/account_spec.rb
|
158
158
|
- spec/balanced/resources/api_key_spec.rb
|
159
|
+
- spec/balanced/resources/hold_spec.rb
|
159
160
|
- spec/balanced/resources/marketplace_spec.rb
|
160
161
|
- spec/balanced_spec.rb
|
161
162
|
- spec/client_spec.rb
|
@@ -188,6 +189,7 @@ summary: Sign up on https://balancedpayments.com/
|
|
188
189
|
test_files:
|
189
190
|
- spec/balanced/resources/account_spec.rb
|
190
191
|
- spec/balanced/resources/api_key_spec.rb
|
192
|
+
- spec/balanced/resources/hold_spec.rb
|
191
193
|
- spec/balanced/resources/marketplace_spec.rb
|
192
194
|
- spec/balanced_spec.rb
|
193
195
|
- spec/client_spec.rb
|