balanced 0.3.6 → 0.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/balanced/resources/hold.rb +6 -1
- data/lib/balanced/version.rb +1 -1
- data/spec/balanced/resources/hold_spec.rb +17 -1
- metadata +2 -2
data/lib/balanced/version.rb
CHANGED
@@ -33,7 +33,23 @@ describe Balanced::Hold do
|
|
33
33
|
|
34
34
|
subject { @hold.is_void }
|
35
35
|
it { should be_true }
|
36
|
-
end
|
36
|
+
end
|
37
|
+
|
38
|
+
describe 'when exception is thrown' do
|
39
|
+
use_vcr_cassette
|
40
|
+
before do
|
41
|
+
@hold = @buyer.hold 150
|
42
|
+
@debit = @hold.capture
|
43
|
+
end
|
44
|
+
|
45
|
+
it "should not change void state since its captured" do
|
46
|
+
lambda { @hold.void }.should raise_error(Balanced::Conflict)
|
47
|
+
@hold.is_void.should be_false
|
48
|
+
end
|
49
|
+
# void here.
|
50
|
+
|
51
|
+
|
52
|
+
end
|
37
53
|
|
38
54
|
end
|
39
55
|
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.7
|
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-07-
|
12
|
+
date: 2012-07-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: faraday
|