spree_frontend 3.0.4 → 3.0.5

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
  SHA1:
3
- metadata.gz: 3c2726ba953462dbebf7c70c869580de5a96879f
4
- data.tar.gz: f28a27713a8c167f963c756e7e4c8d0375db69fd
3
+ metadata.gz: ab6fd9ba5a3ee4ac1adb39f1ce3081641a02bdda
4
+ data.tar.gz: 190246b10697093f670baa1b64099627491fc94d
5
5
  SHA512:
6
- metadata.gz: 54c94e913751391e890acf45393efa77e0e79c7383d24ac8f35a86997e18041de6462c25f02a7a16b8f8cf8772b47db8ea0e6645ee5072ecc567cd2a89bb61f4
7
- data.tar.gz: 4ccde10171e0ff16a67b5efb6ae228ddf7a36f7da98c9d6b5d8cb24f5c161d96ddf7ca37dc97e57b240483af4c1a215565166f1bf09d567c8d70a3784eb663be
6
+ metadata.gz: dfba6480530d5c5ac068eec202f1365e496bd62e88081a23efb686654292cf53e2229e51315cf0d4ea17909bd5b6798158feee0e8a741a35e837722bdc9b1808
7
+ data.tar.gz: 55f46306346f04b7ae1e4237afa5afaadcdbf1b69e7686ee08e3c67b6c8027cf205ce67c772c139d6a7fa11154f9a3121a4de6bedb75553a389cbbf1511f7490
@@ -156,13 +156,6 @@ module Spree
156
156
  @differentiator.missing.each do |variant, quantity|
157
157
  @order.contents.remove(variant, quantity)
158
158
  end
159
-
160
- # @order.contents.remove did transitively call reload in the past.
161
- # Hiding the fact that the machine advanced already to "payment" state.
162
- #
163
- # As an intermediary step to optimize reloads out of high volume code path
164
- # the reload was lifted here and will be removed by later passes.
165
- @order.reload
166
159
  end
167
160
 
168
161
  if try_spree_current_user && try_spree_current_user.respond_to?(:payment_sources)
@@ -430,4 +430,26 @@ describe Spree::CheckoutController, type: :controller do
430
430
  expect { spree_post :update, state: "payment" }.
431
431
  to change { order.reload.line_items.length }
432
432
  end
433
+
434
+ context 'in the payment step' do
435
+ let(:order) { OrderWalkthrough.up_to(:payment) }
436
+ let(:payment_method_id) { Spree::PaymentMethod.first.id }
437
+
438
+ before do
439
+ expect(order.state).to eq 'payment'
440
+ allow(order).to receive_messages user: user
441
+ allow(order).to receive_messages confirmation_required?: true
442
+ end
443
+
444
+ it 'does not advance the order extra even when called twice' do
445
+ spree_put :update, state: 'payment',
446
+ order: { payments_attributes: [{ payment_method_id: payment_method_id }] }
447
+ order.reload
448
+ expect(order.state).to eq 'confirm'
449
+ spree_put :update, state: 'payment',
450
+ order: { payments_attributes: [{ payment_method_id: payment_method_id }] }
451
+ order.reload
452
+ expect(order.state).to eq 'confirm'
453
+ end
454
+ end
433
455
  end
data/spec/spec_helper.rb CHANGED
@@ -47,6 +47,9 @@ require 'spree/testing_support/caching'
47
47
 
48
48
  require 'paperclip/matchers'
49
49
 
50
+ require 'capybara-screenshot/rspec'
51
+ Capybara.save_and_open_page_path = ENV['CIRCLE_ARTIFACTS'] if ENV['CIRCLE_ARTIFACTS']
52
+
50
53
  if ENV['WEBDRIVER'] == 'accessible'
51
54
  require 'capybara/accessible'
52
55
  Capybara.javascript_driver = :accessible
@@ -0,0 +1,7 @@
1
+ # Fix for rspec-rails and rails 4.2.5.1
2
+ # # This can be removed as soon as doing so doesn't cause test errors.
3
+ # # See https://github.com/rspec/rspec-rails/issues/1532
4
+
5
+ RSpec::Rails::ViewRendering::EmptyTemplatePathSetDecorator.class_eval do
6
+ alias_method :find_all_anywhere, :find_all
7
+ end
@@ -24,7 +24,6 @@ Gem::Specification.new do |s|
24
24
  s.add_dependency 'bootstrap-sass', '~> 3.3.1'
25
25
  s.add_dependency 'canonical-rails', '~> 0.0.4'
26
26
  s.add_dependency 'jquery-rails', '~> 4.0.3'
27
- s.add_dependency 'sprockets-rails', '~> 2.2'
28
27
 
29
28
  s.add_development_dependency 'capybara-accessible'
30
29
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_frontend
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.4
4
+ version: 3.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Schofield
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-19 00:00:00.000000000 Z
11
+ date: 2016-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: spree_api
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 3.0.4
19
+ version: 3.0.5
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.0.4
26
+ version: 3.0.5
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: spree_core
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 3.0.4
33
+ version: 3.0.5
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 3.0.4
40
+ version: 3.0.5
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bootstrap-sass
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -80,20 +80,6 @@ dependencies:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: 4.0.3
83
- - !ruby/object:Gem::Dependency
84
- name: sprockets-rails
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: '2.2'
90
- type: :runtime
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: '2.2'
97
83
  - !ruby/object:Gem::Dependency
98
84
  name: capybara-accessible
99
85
  requirement: !ruby/object:Gem::Requirement
@@ -515,6 +501,7 @@ files:
515
501
  - spec/helpers/order_helper_spec.rb
516
502
  - spec/helpers/taxons_helper_spec.rb
517
503
  - spec/spec_helper.rb
504
+ - spec/support/rspec_rails_4_2_5_1.rb
518
505
  - spec/support/shared_contexts/checkout_setup.rb
519
506
  - spec/support/shared_contexts/custom_products.rb
520
507
  - spec/support/shared_contexts/product_prototypes.rb
@@ -591,7 +578,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
591
578
  requirements:
592
579
  - none
593
580
  rubyforge_project:
594
- rubygems_version: 2.4.5
581
+ rubygems_version: 2.4.6
595
582
  signing_key:
596
583
  specification_version: 4
597
584
  summary: Frontend e-commerce functionality for the Spree project.
@@ -629,7 +616,9 @@ test_files:
629
616
  - spec/helpers/order_helper_spec.rb
630
617
  - spec/helpers/taxons_helper_spec.rb
631
618
  - spec/spec_helper.rb
619
+ - spec/support/rspec_rails_4_2_5_1.rb
632
620
  - spec/support/shared_contexts/checkout_setup.rb
633
621
  - spec/support/shared_contexts/custom_products.rb
634
622
  - spec/support/shared_contexts/product_prototypes.rb
635
623
  - spec/views/spree/checkout/_summary_spec.rb
624
+ has_rdoc: