poundpay 0.3 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +1 -1
- data/lib/poundpay/elements.rb +1 -1
- data/lib/poundpay/version.rb +1 -1
- data/spec/poundpay/elements_spec.rb +15 -0
- metadata +2 -2
data/README.rdoc
CHANGED
data/lib/poundpay/elements.rb
CHANGED
data/lib/poundpay/version.rb
CHANGED
@@ -67,6 +67,21 @@ describe Payment do
|
|
67
67
|
Poundpay.clear_config!
|
68
68
|
end
|
69
69
|
|
70
|
+
describe "#authorize" do
|
71
|
+
it "should not be able to authorize a non STAGED payment" do
|
72
|
+
@non_staged_payment = Payment.new authorized_payment_attributes
|
73
|
+
expect {@non_staged_payment.authorize}.to raise_error(PaymentAuthorizeException)
|
74
|
+
end
|
75
|
+
|
76
|
+
it "should authorize a STAGED payment" do
|
77
|
+
@staged_payment = Payment.new staged_payment_attributes
|
78
|
+
@staged_payment.should_receive(:save).and_return(Payment.new authorized_payment_attributes)
|
79
|
+
|
80
|
+
@staged_payment.authorize
|
81
|
+
@staged_payment.status.should == 'AUTHORIZED'
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
70
85
|
describe "#escrow" do
|
71
86
|
it "should not be able to escrow a STAGED payment" do
|
72
87
|
@staged_payment = Payment.new staged_payment_attributes
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: poundpay
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version:
|
5
|
+
version: 0.3.1
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Matin Tamizi
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-11-
|
13
|
+
date: 2011-11-20 00:00:00 -08:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|