workarea-storefront 3.5.11 → 3.5.12

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: 2d17dfbda0e576cfb677b85dfeeec873e3298a1bb50cfdaba1e2718230d48cb7
4
- data.tar.gz: 31fa8f33a31315e15944a7a1849504cf476f1cfbc3592e22a7e1c0447aaf5136
3
+ metadata.gz: 5927c378602c40ee9b4597baf1afa11d4bc0af1168eceac4ae32135864c09e1c
4
+ data.tar.gz: aad145d930b02c1b4ac12d1032d58591327f236f37c9ac0cf3a5a9dd825cc08c
5
5
  SHA512:
6
- metadata.gz: 1b5dd4aa87edc5d005e42a759fa7134269e959da444ac58e66de114f8d12fbb70092b788f60222cb2ebf0ed99c15bdea2987b4fb4af06f2c73ada22cee676e57
7
- data.tar.gz: 73204e45143a99faae0979672ab3250d5fb62e5f8176eee60b7d58f74e82bbabb9dde03b12b24c5286bb018a26555a7e06a267daab45ca2e4aae4c2a03f7e1eb
6
+ metadata.gz: 70ad91e1b06aceb9dba188fd711068a6cba35f9709c162e08b0fba876c953bfe8550441ada2f8753282536744918af55d0c8a09ecc0c31800cdff3e9793f3444
7
+ data.tar.gz: 3b4d4ccb95b1f7898b4f07873c5c54b191a6903cbe1459a898d134c02646b345c93993f6bcdb69aab99f0a60faa452fce363eb5cb2e3cf073e81db8ab4a790fb
@@ -44,7 +44,7 @@ module Workarea
44
44
  segment_ids: current_segments.map(&:id)
45
45
  )
46
46
 
47
- update_tracking!(email: current_order.email)
47
+ update_tracking!(email: current_order.email) unless current_order.email.blank?
48
48
  end
49
49
 
50
50
  def with_order_lock
@@ -345,6 +345,12 @@ module Workarea
345
345
 
346
346
  assert(flash[:error].present?)
347
347
  end
348
+
349
+ def test_not_setting_a_blank_tracking_email
350
+ cookies[:email] = 'foo@bar.com'
351
+ get storefront.checkout_shipping_path
352
+ assert_equal('foo@bar.com', cookies[:email])
353
+ end
348
354
  end
349
355
  end
350
356
  end
@@ -271,6 +271,19 @@ module Workarea
271
271
  headers: { 'HTTP_REFERER' => 'https://www.facebook.com/' }
272
272
  assert_equal(google.id.to_s, response.headers['X-Workarea-Segments'])
273
273
  end
274
+
275
+ def test_missing_email_cookies
276
+ user = create_user(password: 'w0rkArea!', tags: %w(foo))
277
+ segment = create_segment(rules: [Segment::Rules::Tags.new(tags: %w(foo))])
278
+
279
+ post storefront.login_path,
280
+ params: { email: user.email, password: 'w0rkArea!' }
281
+
282
+ cookies[:email] = nil
283
+
284
+ get storefront.current_user_path(format: 'json')
285
+ assert_equal(segment.id.to_s, response.headers['X-Workarea-Segments'])
286
+ end
274
287
  end
275
288
  end
276
289
  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.11
4
+ version: 3.5.12
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-05-13 00:00:00.000000000 Z
11
+ date: 2020-05-26 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.11
19
+ version: 3.5.12
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.11
26
+ version: 3.5.12
27
27
  description: Provides user-facing ecommerce storefront functionality for the Workarea
28
28
  Commerce Platform.
29
29
  email: