workarea-storefront 3.4.30 → 3.4.31

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e9f6fa3a951c3d12fedefc302b38c90265351850580d4dfc159700622e30589c
4
- data.tar.gz: e989f30cd502dfc2ccd005bb93f379701548e0e87db65e78bf7414cc865aa71e
3
+ metadata.gz: 688b10056415b2e71288ba5898f835970ae7d8e19499b0bff0ee149af3a1e3f6
4
+ data.tar.gz: e16f0d4d08d396dff12da2d1579c75d63f932ed8727eb885ef84b684b7db2923
5
5
  SHA512:
6
- metadata.gz: 406cf8056c0038a5a035e772c48692e97a5d964be38469582f7fb7f1a7cbfe4f99c9ec2cd2a78c878982028d7b4fadf56421f56fe0670a5cda805363890dfa82
7
- data.tar.gz: efc2aeeb8127384987139327f39d7b848c6df3b28c971b6fb16f0d74cda9c1242801b4a69655413eefa720c8f0de7964f075cf5e970f17101faed616d8e3449d
6
+ metadata.gz: a365225a86ccff17b85c72aff436bdb4630d231e14d280e4f74ab23e3f43d8688972d09536fb8fe47cea1b42c76131cc9523b8775e7a705523fdab74dc14c3db
7
+ data.tar.gz: 551bf76be5c0e05beadb4cdb4ceb865d7b77b6d30449245b34e408b5305df43782f67784e48452ef8c0de9186ceb477de96d60b7ac5dae28de752959d7c6619f
@@ -8,7 +8,11 @@ module Workarea
8
8
 
9
9
  def edit
10
10
  reset = User::PasswordReset.find_by(token: params[:token]) rescue nil
11
- redirect_to forgot_password_path unless reset
11
+
12
+ unless reset
13
+ flash[:error] = t('workarea.storefront.flash_messages.password_reset_expired')
14
+ redirect_to forgot_password_path
15
+ end
12
16
  end
13
17
 
14
18
  def create
@@ -10,6 +10,8 @@
10
10
  .product-prices.product-prices--details{ itemprop: 'offers', itemscope: true, itemtype: 'http://schema.org/Offer' }
11
11
  = render 'workarea/storefront/products/pricing', product: product
12
12
 
13
+ = append_partials('storefront.product_pricing_details', product: product)
14
+
13
15
  - if product.description.present?
14
16
  .product-details__description
15
17
  %p= truncated_product_description(product, t('workarea.storefront.products.read_more'))
@@ -10,6 +10,8 @@
10
10
  .product-prices.product-prices--details{ itemprop: 'offers', itemscope: true, itemtype: 'http://schema.org/Offer' }
11
11
  = render 'workarea/storefront/products/pricing', product: product
12
12
 
13
+ = append_partials('storefront.product_pricing_details', product: product)
14
+
13
15
  - if product.description.present?
14
16
  .product-details__description
15
17
  %p= truncated_product_description(product, t('workarea.storefront.products.read_more'))
@@ -31,6 +31,7 @@ module Workarea
31
31
 
32
32
  def test_handles_a_missing_password_reset
33
33
  get storefront.reset_password_path(token: 'foo')
34
+ assert(flash[:error].present?)
34
35
  assert_redirected_to(storefront.forgot_password_path)
35
36
  end
36
37
 
@@ -42,6 +43,24 @@ module Workarea
42
43
  assert(flash[:error].present?)
43
44
  assert(response.redirect?)
44
45
  end
46
+
47
+ def test_expired_resets
48
+ post storefront.forgot_password_path, params: { email: 'passwords@workarea.com' }
49
+ first = User::PasswordReset.desc(:created_at).first
50
+
51
+ get storefront.reset_password_path(token: first.token)
52
+ assert(response.ok?)
53
+
54
+ post storefront.forgot_password_path, params: { email: 'passwords@workarea.com' }
55
+ second = User::PasswordReset.desc(:created_at).first
56
+
57
+ get storefront.reset_password_path(token: second.token)
58
+ assert(response.ok?)
59
+
60
+ get storefront.reset_password_path(token: first.token)
61
+ assert(flash[:error].present?)
62
+ assert_redirected_to(storefront.forgot_password_path)
63
+ end
45
64
  end
46
65
  end
47
66
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: workarea-storefront
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.30
4
+ version: 3.4.31
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Crouse
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-31 00:00:00.000000000 Z
11
+ date: 2020-04-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: workarea-core
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 3.4.30
19
+ version: 3.4.31
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 3.4.30
26
+ version: 3.4.31
27
27
  description: Provides user-facing ecommerce storefront functionality for the Workarea
28
28
  Commerce Platform.
29
29
  email: