active_cart 0.0.15 → 0.0.16

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.15
1
+ 0.0.16
@@ -24,7 +24,7 @@ module ActiveCart
24
24
  base.aasm_state :failed, :enter => :enter_failed, :exit => :exit_failed
25
25
 
26
26
  base.aasm_event :continue_shopping do
27
- transitions :from => [ :checkout, :verifying_payment ], :to => :shopping, :guard => :guard_continue_shopping
27
+ transitions :from => [ :checkout, :verifying_payment, :failed ], :to => :shopping, :guard => :guard_continue_shopping
28
28
  end
29
29
 
30
30
  base.aasm_event :checkout do
@@ -182,6 +182,20 @@ class CartStorageTest < ActiveSupport::TestCase
182
182
  end
183
183
  assert_equal :checkout, @cart_storage_engine.state
184
184
  end
185
+
186
+ should 'transition from failed to shopping' do
187
+ @cart_storage_engine.expects(:exit_failed)
188
+ @cart_storage_engine.expects(:guard_continue_shopping).returns(true)
189
+
190
+ @cart_storage_engine.checkout!
191
+ @cart_storage_engine.check_payment!
192
+ @cart_storage_engine.payment_failed!
193
+ assert_nothing_raised do
194
+ @cart_storage_engine.continue_shopping!
195
+ end
196
+ assert_equal :shopping, @cart_storage_engine.state
197
+ end
198
+
185
199
  end
186
200
  end
187
201
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_cart
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.15
4
+ version: 0.0.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Myles Eftos
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-05-24 00:00:00 +08:00
12
+ date: 2010-05-25 00:00:00 +08:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency