poundpay 0.3 → 0.3.1

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/README.rdoc CHANGED
@@ -7,7 +7,7 @@ Poundpay is a payments platform for marketplaces
7
7
 
8
8
  1. Add the following to your Gemfile
9
9
 
10
- gem 'poundpay', '~> 0.2.9'
10
+ gem 'poundpay', '~> 0.3.1'
11
11
 
12
12
  2. At the command prompt, install the gem with bundler
13
13
 
@@ -75,7 +75,7 @@ module Poundpay
75
75
  unless status == 'STAGED'
76
76
  raise PaymentAuthorizeException.new "Payment status is #{status}. Only STAGED payments may be AUTHORIZED."
77
77
  end
78
- attributes['status'] = 'ESCROWED'
78
+ attributes['status'] = 'AUTHORIZED'
79
79
  save
80
80
  end
81
81
 
@@ -1,3 +1,3 @@
1
1
  module Poundpay
2
- VERSION = "0.3"
2
+ VERSION = "0.3.1"
3
3
  end
@@ -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: "0.3"
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-18 00:00:00 -08:00
13
+ date: 2011-11-20 00:00:00 -08:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency