workarea-storefront 3.5.8 → 3.5.9

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: 75e176db80d296deee6c9b3c137b7c8bf7b00789131342322ab319c5cec058f6
4
- data.tar.gz: 97179fefcf0cb1f9ade197effaf012e36a9ef0dee1e92b54ea85ef13a29c5368
3
+ metadata.gz: 65fb50b29bbd87bd91ecf4a2abc692b17b8b767664e9afaddcb13b3e1b4b31e6
4
+ data.tar.gz: e9960fb2e4b27272fdc8966cb0b8bd3bfe3c1249f10030fba994f9dbbcaa7391
5
5
  SHA512:
6
- metadata.gz: 49b621fc2a3cadaed09ff4b73e507b92f5d953e62e573627b1a860c394c528edadbf4cd7814a0dfbe3ccaed49d78fe06ad4bd4a551aba7a8fa8bdf45c9403c81
7
- data.tar.gz: afb750b921e132d81e39e8a4f13c46e2ca486260afbe99e6c0da810d1cee8dcf4217eab8b23399fd42fb3fd003ce4676a7cdf626e358b93eb5475f2c45d9eceb
6
+ metadata.gz: 417940f49bf5f39cf909f945a9fd4a4dcedadf3080d409514ae2b0c1c12602f18cec1fc61e655cad8a38069d8017c427cc00c05f8f46403815c66d39f75e3156
7
+ data.tar.gz: 28eb9182e7b1d3a24f5cc2bac7576976e0340318e4588de57548d3cd096669e9b167028f2576a77a36e2e10974b722a5c4d8225e182b657e490678f4e091257f
@@ -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
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
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.5.8
4
+ version: 3.5.9
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.5.8
19
+ version: 3.5.9
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.5.8
26
+ version: 3.5.9
27
27
  description: Provides user-facing ecommerce storefront functionality for the Workarea
28
28
  Commerce Platform.
29
29
  email: