solidus_frontend 2.6.5 → 2.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of solidus_frontend might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.md +7 -5
- data/app/assets/images/favicon.ico +0 -0
- data/app/assets/javascripts/spree/frontend/checkout/coupon-code.js +2 -1
- data/app/assets/stylesheets/spree/frontend/screen.css.scss +39 -1
- data/app/controllers/spree/checkout_controller.rb +61 -3
- data/app/controllers/spree/coupon_codes_controller.rb +35 -0
- data/app/controllers/spree/locale_controller.rb +1 -1
- data/app/controllers/spree/orders_controller.rb +27 -12
- data/app/controllers/spree/store_controller.rb +0 -18
- data/app/controllers/spree/taxons_controller.rb +6 -3
- data/app/views/spree/checkout/_coupon_code.html.erb +12 -0
- data/app/views/spree/checkout/_delivery.html.erb +6 -2
- data/app/views/spree/checkout/_payment.html.erb +0 -10
- data/app/views/spree/checkout/_summary.html.erb +4 -0
- data/app/views/spree/checkout/payment/_gateway.html.erb +6 -5
- data/app/views/spree/coupon_codes/new.html.erb +6 -0
- data/app/views/spree/orders/_form.html.erb +1 -1
- data/app/views/spree/orders/_line_item.html.erb +3 -5
- data/app/views/spree/orders/edit.html.erb +5 -6
- data/app/views/spree/products/_image.html.erb +4 -1
- data/app/views/spree/products/_thumbnails.html.erb +10 -8
- data/app/views/spree/shared/_image.html.erb +4 -4
- data/app/views/spree/shared/_locale_selector.html.erb +1 -1
- data/app/views/spree/shared/_order_details.html.erb +3 -5
- data/app/views/spree/shared/_products.html.erb +1 -1
- data/config/routes.rb +1 -0
- data/lib/spree/frontend.rb +1 -1
- data/solidus_frontend.gemspec +1 -1
- data/spec/controllers/spree/checkout_controller_spec.rb +109 -9
- data/spec/controllers/spree/checkout_controller_with_views_spec.rb +1 -1
- data/spec/controllers/spree/home_controller_spec.rb +1 -1
- data/spec/controllers/spree/orders_controller_ability_spec.rb +11 -30
- data/spec/controllers/spree/orders_controller_spec.rb +54 -3
- data/spec/controllers/spree/products_controller_spec.rb +3 -3
- data/spec/controllers/spree/taxons_controller_spec.rb +1 -1
- data/spec/features/address_spec.rb +1 -1
- data/spec/features/automatic_promotion_adjustments_spec.rb +2 -2
- data/spec/features/caching/taxons_spec.rb +1 -1
- data/spec/features/checkout_confirm_insufficient_stock_spec.rb +71 -0
- data/spec/features/checkout_spec.rb +34 -25
- data/spec/features/coupon_code_spec.rb +96 -56
- data/spec/features/currency_spec.rb +1 -1
- data/spec/features/first_order_promotion_spec.rb +59 -0
- data/spec/features/free_shipping_promotions_spec.rb +2 -2
- data/spec/features/products_spec.rb +8 -8
- data/spec/features/promotion_code_invalidation_spec.rb +2 -2
- data/spec/features/quantity_promotions_spec.rb +9 -9
- data/spec/spec_helper.rb +1 -1
- metadata +14 -9
- data/spec/support/features/fill_in_with_force.rb +0 -12
@@ -56,16 +56,6 @@
|
|
56
56
|
<% end %>
|
57
57
|
</ul>
|
58
58
|
<br style="clear:both;" />
|
59
|
-
<p class='field' data-hook='coupon_code'>
|
60
|
-
<%= form.label :coupon_code %>
|
61
|
-
<%= form.text_field :coupon_code %>
|
62
|
-
<button type="button" class="button" id="coupon-code-apply-button">
|
63
|
-
<%= t('spree.apply_code') %>
|
64
|
-
</button>
|
65
|
-
|
66
|
-
</p>
|
67
|
-
<div id='coupon_status'></div>
|
68
|
-
|
69
59
|
</div>
|
70
60
|
</fieldset>
|
71
61
|
|
@@ -1,14 +1,15 @@
|
|
1
1
|
<%= image_tag 'credit_cards/credit_card.gif', id: 'credit-card-image' %>
|
2
2
|
<% param_prefix = "payment_source[#{payment_method.id}]" %>
|
3
3
|
|
4
|
-
<div class="field field-required">
|
4
|
+
<div class="field field-required card_name" data-hook="card_name">
|
5
5
|
<%= label_tag "name_on_card_#{payment_method.id}", t('spree.name_on_card') %>
|
6
|
-
<%= text_field_tag "#{param_prefix}[name]", "#{@order.billing_firstname} #{@order.billing_lastname}", { id: "name_on_card_#{payment_method.id}", autocomplete: "cc-name" } %>
|
6
|
+
<%= text_field_tag "#{param_prefix}[name]", "#{@order.billing_firstname} #{@order.billing_lastname}", { id: "name_on_card_#{payment_method.id}", autocomplete: "cc-name", class: 'cardName' } %>
|
7
7
|
</div>
|
8
8
|
|
9
|
-
<div class="field field-required" data-hook="card_number">
|
9
|
+
<div class="field field-required card_number" data-hook="card_number">
|
10
10
|
<%= label_tag "card_number", t('spree.card_number') %>
|
11
11
|
<%= text_field_tag "#{param_prefix}[number]", '', {id: 'card_number', class: 'required cardNumber', size: 19, maxlength: 19, autocomplete: "cc-number", type: "tel" } %>
|
12
|
+
|
12
13
|
<span id="card_type" style="display:none;">
|
13
14
|
( <span id="looks_like" ><%= t('spree.card_type_is') %> <span id="type"></span></span>
|
14
15
|
<span id="unrecognized"><%= t('spree.unrecognized_card_type') %></span>
|
@@ -16,12 +17,12 @@
|
|
16
17
|
</span>
|
17
18
|
</div>
|
18
19
|
|
19
|
-
<div class="field field-required" data-hook="card_expiration">
|
20
|
+
<div class="field field-required card_expiration" data-hook="card_expiration">
|
20
21
|
<%= label_tag "card_expiry", t('spree.expiration') %>
|
21
22
|
<%= text_field_tag "#{param_prefix}[expiry]", '', id: 'card_expiry', class: "required cardExpiry", placeholder: "MM / YY", type: "tel" %>
|
22
23
|
</div>
|
23
24
|
|
24
|
-
<div class="field field-required" data-hook="card_code">
|
25
|
+
<div class="field field-required card_code" data-hook="card_code">
|
25
26
|
<%= label_tag "card_code", t('spree.card_code') %>
|
26
27
|
<%= text_field_tag "#{param_prefix}[verification_value]", '', {id: 'card_code', class: 'required cardCode', size: 5, type: "tel", autocomplete: "off" } %>
|
27
28
|
<%= link_to "(#{t('spree.what_is_this')})", spree.cvv_path, target: '_blank', "data-hook" => "cvv_link", id: "cvv_link" %>
|
@@ -15,7 +15,7 @@
|
|
15
15
|
</tbody>
|
16
16
|
<% if order.adjustments.nonzero.exists? || order.line_item_adjustments.nonzero.exists? || order.shipment_adjustments.nonzero.exists? || order.shipments.any? %>
|
17
17
|
<tr class="cart-subtotal">
|
18
|
-
<td colspan="4" align='right'><h5><%= t('spree.cart_subtotal', count: order.line_items.sum(:quantity)) %></h5></
|
18
|
+
<td colspan="4" align='right'><h5><%= t('spree.cart_subtotal', count: order.line_items.sum(:quantity)) %></h5></td>
|
19
19
|
<td colspan><h5><%= order.display_item_total %></h5></td>
|
20
20
|
<td></td>
|
21
21
|
</tr>
|
@@ -2,11 +2,9 @@
|
|
2
2
|
<%= order_form.fields_for :line_items, line_item do |item_form| -%>
|
3
3
|
<tr class="<%= cycle('', 'alt') %> line-item">
|
4
4
|
<td class="cart-item-image" data-hook="cart_item_image">
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
<%= link_to(render('spree/shared/image', image: variant.images.first, size: :small), variant.product) %>
|
9
|
-
<% end %>
|
5
|
+
<%= link_to(render('spree/shared/image',
|
6
|
+
image: (variant.gallery.images.first || variant.product.gallery.images.first),
|
7
|
+
size: :small), variant.product) %>
|
10
8
|
</td>
|
11
9
|
<td class="cart-item-description" data-hook="cart_item_description">
|
12
10
|
<h4><%= link_to line_item.name, product_path(variant.product) %></h4>
|
@@ -16,19 +16,16 @@
|
|
16
16
|
<div data-hook="inside_cart_form">
|
17
17
|
|
18
18
|
<div data-hook="cart_items">
|
19
|
-
<%= render 'form', order_form: order_form %>
|
19
|
+
<%= render 'spree/orders/form', order_form: order_form %>
|
20
20
|
</div>
|
21
21
|
|
22
22
|
<div class="links columns sixteen alpha omega" data-hook="cart_buttons">
|
23
|
-
<%=
|
24
|
-
|
25
|
-
<%= t('spree.update') %>
|
26
|
-
<% end %>
|
23
|
+
<%= button_tag t("spree.update"), class: "primary", id: "update-button" %>
|
24
|
+
|
27
25
|
<%= button_tag class: 'button checkout primary', id: 'checkout-link', name: 'checkout' do %>
|
28
26
|
<%= t('spree.checkout') %>
|
29
27
|
<% end %>
|
30
28
|
</div>
|
31
|
-
|
32
29
|
</div>
|
33
30
|
<% end %>
|
34
31
|
</div>
|
@@ -41,6 +38,8 @@
|
|
41
38
|
<%= link_to t('spree.continue_shopping'), products_path, class: 'continue button gray' %>
|
42
39
|
</p>
|
43
40
|
<% end %>
|
41
|
+
|
42
|
+
<%= render template: 'spree/coupon_codes/new' %>
|
44
43
|
</div>
|
45
44
|
|
46
45
|
<% end %>
|
@@ -1,5 +1,8 @@
|
|
1
1
|
<% if defined?(image) && image %>
|
2
2
|
<%= render 'spree/shared/image', image: image, size: :product, itemprop: "image" %>
|
3
3
|
<% else %>
|
4
|
-
<%= render 'spree/shared/image',
|
4
|
+
<%= render 'spree/shared/image',
|
5
|
+
image: @product.gallery.images.first,
|
6
|
+
size: :product,
|
7
|
+
itemprop: "image" %>
|
5
8
|
<% end %>
|
@@ -1,17 +1,19 @@
|
|
1
1
|
<%# no need for thumbnails unless there is more than one image %>
|
2
|
-
<% if
|
2
|
+
<% if @product.gallery.images.size > 1 %>
|
3
3
|
<ul id="product-thumbnails" class="thumbnails inline" data-hook>
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
|
5
|
+
<% @product.gallery.images.each do |image| %>
|
6
|
+
<% next if image.viewable_id != @product.master.id %>
|
7
|
+
<li class='tmb-all tmb-<%= image.viewable_id %>'>
|
8
|
+
<%= link_to(image_tag(image.url(:mini)), image.url(:product)) %>
|
7
9
|
</li>
|
8
10
|
<% end %>
|
9
11
|
|
10
12
|
<% if @product.has_variants? %>
|
11
|
-
<% @product.
|
12
|
-
<% next if @product.
|
13
|
-
<li class='vtmb tmb-<%=
|
14
|
-
<%= link_to(image_tag(
|
13
|
+
<% @product.gallery.images.each do |image| %>
|
14
|
+
<% next if image.viewable_id == @product.master.id %>
|
15
|
+
<li class='vtmb tmb-<%= image.viewable_id %>'>
|
16
|
+
<%= link_to(image_tag(image.url(:mini)), image.url(:product)) %>
|
15
17
|
</li>
|
16
18
|
<% end %>
|
17
19
|
<% end %>
|
@@ -1,11 +1,11 @@
|
|
1
1
|
<% size ||= :mini %>
|
2
2
|
<% itemprop ||= nil %>
|
3
3
|
|
4
|
-
<% if
|
5
|
-
<% if
|
6
|
-
<%= image_tag
|
4
|
+
<% if image_url = image.try(:url, size) %>
|
5
|
+
<% if image_alt = image.try(:alt) %>
|
6
|
+
<%= image_tag image_url, alt: image_alt, itemprop: itemprop %>
|
7
7
|
<% else %>
|
8
|
-
<%= image_tag
|
8
|
+
<%= image_tag image_url, itemprop: itemprop %>
|
9
9
|
<% end %>
|
10
10
|
<% else %>
|
11
11
|
<span class="image-placeholder <%= size %>"></span>
|
@@ -62,11 +62,9 @@
|
|
62
62
|
<% order.line_items.each do |item| %>
|
63
63
|
<tr data-hook="order_details_line_item_row">
|
64
64
|
<td data-hook="order_item_image">
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
<%= link_to(render('spree/shared/image', image: item.variant.images.first, size: :small), item.variant.product) %>
|
69
|
-
<% end %>
|
65
|
+
<%= link_to(render('spree/shared/image',
|
66
|
+
image: (item.variant.gallery.images.first || item.variant.product.gallery.images.first),
|
67
|
+
size: :small), item.variant.product) %>
|
70
68
|
</td>
|
71
69
|
<td data-hook="order_item_description">
|
72
70
|
<h4><%= item.variant.product.name %></h4>
|
@@ -28,7 +28,7 @@
|
|
28
28
|
<li id="product_<%= product.id %>" class="columns three <%= cycle("alpha", "secondary", "", "omega secondary", name: "classes") %>" data-hook="products_list_item" itemscope itemtype="http://schema.org/Product">
|
29
29
|
<% cache(@taxon.present? ? [I18n.locale, current_pricing_options, @taxon, product] : [I18n.locale, current_pricing_options, product]) do %>
|
30
30
|
<div class="product-image">
|
31
|
-
<%= link_to(render('spree/shared/image', image: product.
|
31
|
+
<%= link_to(render('spree/shared/image', image: product.gallery.images.first, size: :small, itemprop: "image"), url, itemprop: 'url') %>
|
32
32
|
</div>
|
33
33
|
<%= link_to truncate(product.name, length: 50), url, class: 'info', itemprop: "name", title: product.name %>
|
34
34
|
<span itemprop="offers" itemscope itemtype="http://schema.org/Offer">
|
data/config/routes.rb
CHANGED
data/lib/spree/frontend.rb
CHANGED
data/solidus_frontend.gemspec
CHANGED
@@ -28,7 +28,7 @@ Gem::Specification.new do |s|
|
|
28
28
|
s.add_dependency 'font-awesome-rails', '~> 4.0'
|
29
29
|
s.add_dependency 'jquery-rails'
|
30
30
|
s.add_dependency 'kaminari', '~> 1.1'
|
31
|
-
s.add_dependency '
|
31
|
+
s.add_dependency 'sassc-rails'
|
32
32
|
s.add_dependency 'truncate_html', '~> 0.9', '>= 0.9.2'
|
33
33
|
|
34
34
|
s.add_development_dependency 'capybara-accessible'
|
@@ -14,7 +14,6 @@ describe Spree::CheckoutController, type: :controller do
|
|
14
14
|
|
15
15
|
before do
|
16
16
|
allow(controller).to receive_messages try_spree_current_user: user
|
17
|
-
allow(controller).to receive_messages spree_current_user: user
|
18
17
|
allow(controller).to receive_messages current_order: order
|
19
18
|
end
|
20
19
|
|
@@ -90,7 +89,7 @@ describe Spree::CheckoutController, type: :controller do
|
|
90
89
|
order.line_items << FactoryBot.create(:line_item)
|
91
90
|
end
|
92
91
|
|
93
|
-
context "with the order in the cart state" do
|
92
|
+
context "with the order in the cart state", partial_double_verification: false do
|
94
93
|
before do
|
95
94
|
order.update_attributes! user: user
|
96
95
|
order.update_column(:state, "cart")
|
@@ -139,7 +138,7 @@ describe Spree::CheckoutController, type: :controller do
|
|
139
138
|
end
|
140
139
|
end
|
141
140
|
|
142
|
-
context "with the order in the address state" do
|
141
|
+
context "with the order in the address state", partial_double_verification: false do
|
143
142
|
before do
|
144
143
|
order.update_attributes! user: user
|
145
144
|
order.update_columns(ship_address_id: create(:address).id, state: "address")
|
@@ -152,7 +151,7 @@ describe Spree::CheckoutController, type: :controller do
|
|
152
151
|
end
|
153
152
|
end
|
154
153
|
|
155
|
-
context "with a billing and shipping address" do
|
154
|
+
context "with a billing and shipping address", partial_double_verification: false do
|
156
155
|
subject do
|
157
156
|
post :update, params: {
|
158
157
|
state: "address",
|
@@ -184,7 +183,7 @@ describe Spree::CheckoutController, type: :controller do
|
|
184
183
|
# the same thing here.
|
185
184
|
# Perhaps we can just remove 'set_payment_parameters_amount' entirely at
|
186
185
|
# some point?
|
187
|
-
context "when there is a checkout step between payment and confirm" do
|
186
|
+
context "when there is a checkout step between payment and confirm", partial_double_verification: false do
|
188
187
|
before do
|
189
188
|
@old_checkout_flow = Spree::Order.checkout_flow
|
190
189
|
Spree::Order.class_eval do
|
@@ -227,7 +226,7 @@ describe Spree::CheckoutController, type: :controller do
|
|
227
226
|
end
|
228
227
|
end
|
229
228
|
|
230
|
-
context "when in the payment state" do
|
229
|
+
context "when in the payment state", partial_double_verification: false do
|
231
230
|
let(:order) { create(:order_with_line_items) }
|
232
231
|
let(:payment_method) { create(:credit_card_payment_method) }
|
233
232
|
|
@@ -420,6 +419,45 @@ describe Spree::CheckoutController, type: :controller do
|
|
420
419
|
expect(flash[:error]).to eq(I18n.t('spree.payment_processing_failed'))
|
421
420
|
end
|
422
421
|
end
|
422
|
+
|
423
|
+
context "when InsufficientStock error is raised" do
|
424
|
+
before do
|
425
|
+
allow(controller).to receive_messages current_order: order
|
426
|
+
allow(controller).to receive_messages check_authorization: true
|
427
|
+
allow(controller).to receive_messages ensure_sufficient_stock_lines: true
|
428
|
+
end
|
429
|
+
|
430
|
+
context "when the order has no shipments" do
|
431
|
+
let(:order) { Spree::TestingSupport::OrderWalkthrough.up_to(:address) }
|
432
|
+
|
433
|
+
before do
|
434
|
+
allow(order).to receive_messages shipments: []
|
435
|
+
# Order#next is the tipical failure point here:
|
436
|
+
allow(order).to receive(:next).and_raise(Spree::Order::InsufficientStock)
|
437
|
+
end
|
438
|
+
|
439
|
+
it "redirects the customer to the cart page with an error message" do
|
440
|
+
put :update, params: { state: order.state, order: {} }
|
441
|
+
expect(flash[:error]).to eq(I18n.t('spree.insufficient_stock_for_order'))
|
442
|
+
expect(response).to redirect_to(spree.cart_path)
|
443
|
+
end
|
444
|
+
end
|
445
|
+
|
446
|
+
context "when the order has shipments" do
|
447
|
+
let(:order) { Spree::TestingSupport::OrderWalkthrough.up_to(:payment) }
|
448
|
+
|
449
|
+
context "when items become somehow not available anymore" do
|
450
|
+
before { Spree::StockItem.update_all backorderable: false }
|
451
|
+
|
452
|
+
it "redirects the customer to the address checkout page with an error message" do
|
453
|
+
put :update, params: { state: order.state, order: {} }
|
454
|
+
error = I18n.t('spree.inventory_error_flash_for_insufficient_shipment_quantity', unavailable_items: order.products.first.name)
|
455
|
+
expect(flash[:error]).to eq(error)
|
456
|
+
expect(response).to redirect_to(spree.checkout_state_path(state: :address))
|
457
|
+
end
|
458
|
+
end
|
459
|
+
end
|
460
|
+
end
|
423
461
|
end
|
424
462
|
|
425
463
|
context "When last inventory item has been purchased" do
|
@@ -431,9 +469,7 @@ describe Spree::CheckoutController, type: :controller do
|
|
431
469
|
before do
|
432
470
|
allow(order).to receive_messages(line_items: [line_item], state: "payment")
|
433
471
|
|
434
|
-
|
435
|
-
config.track_inventory_levels = true
|
436
|
-
end
|
472
|
+
stub_spree_preferences(track_inventory_levels: true)
|
437
473
|
end
|
438
474
|
|
439
475
|
context "and back orders are not allowed" do
|
@@ -478,4 +514,68 @@ describe Spree::CheckoutController, type: :controller do
|
|
478
514
|
post :update, params: { state: "payment" }
|
479
515
|
}.to change { order.line_items.to_a.size }.from(1).to(0)
|
480
516
|
end
|
517
|
+
|
518
|
+
context 'trying to apply a coupon code' do
|
519
|
+
let(:order) { create(:order_with_line_items, state: 'payment', guest_token: 'a token') }
|
520
|
+
let(:coupon_code) { "coupon_code" }
|
521
|
+
|
522
|
+
before { cookies.signed[:guest_token] = order.guest_token }
|
523
|
+
|
524
|
+
context "when coupon code is empty" do
|
525
|
+
let(:coupon_code) { "" }
|
526
|
+
|
527
|
+
it 'does not try to apply coupon code' do
|
528
|
+
expect(Spree::PromotionHandler::Coupon).not_to receive :new
|
529
|
+
|
530
|
+
put :update, params: { state: order.state, order: { coupon_code: coupon_code } }
|
531
|
+
|
532
|
+
expect(response).to redirect_to(spree.checkout_state_path('confirm'))
|
533
|
+
end
|
534
|
+
end
|
535
|
+
|
536
|
+
context "when coupon code is applied" do
|
537
|
+
let(:promotion_handler) { instance_double('Spree::PromotionHandler::Coupon', error: nil, success: 'Coupon Applied!') }
|
538
|
+
|
539
|
+
it "continues checkout flow normally" do
|
540
|
+
expect(Spree::Deprecation).to receive(:warn)
|
541
|
+
|
542
|
+
expect(Spree::PromotionHandler::Coupon)
|
543
|
+
.to receive_message_chain(:new, :apply)
|
544
|
+
.and_return(promotion_handler)
|
545
|
+
|
546
|
+
put :update, params: { state: order.state, order: { coupon_code: coupon_code } }
|
547
|
+
|
548
|
+
expect(response).to render_template :edit
|
549
|
+
expect(flash.now[:success]).to eq('Coupon Applied!')
|
550
|
+
end
|
551
|
+
|
552
|
+
context "when coupon code is not applied" do
|
553
|
+
let(:promotion_handler) { instance_double('Spree::PromotionHandler::Coupon', error: 'Some error', success: false) }
|
554
|
+
|
555
|
+
it "setups the current step correctly before rendering" do
|
556
|
+
expect(Spree::Deprecation).to receive(:warn)
|
557
|
+
|
558
|
+
expect(Spree::PromotionHandler::Coupon)
|
559
|
+
.to receive_message_chain(:new, :apply)
|
560
|
+
.and_return(promotion_handler)
|
561
|
+
expect(controller).to receive(:setup_for_current_state)
|
562
|
+
|
563
|
+
put :update, params: { state: order.state, order: { coupon_code: coupon_code } }
|
564
|
+
end
|
565
|
+
|
566
|
+
it "render cart with coupon error" do
|
567
|
+
expect(Spree::Deprecation).to receive(:warn)
|
568
|
+
|
569
|
+
expect(Spree::PromotionHandler::Coupon)
|
570
|
+
.to receive_message_chain(:new, :apply)
|
571
|
+
.and_return(promotion_handler)
|
572
|
+
|
573
|
+
put :update, params: { state: order.state, order: { coupon_code: coupon_code } }
|
574
|
+
|
575
|
+
expect(response).to render_template :edit
|
576
|
+
expect(flash.now[:error]).to eq('Some error')
|
577
|
+
end
|
578
|
+
end
|
579
|
+
end
|
580
|
+
end
|
481
581
|
end
|
@@ -16,7 +16,7 @@ describe Spree::CheckoutController, type: :controller do
|
|
16
16
|
# Regression test for https://github.com/spree/spree/issues/3246
|
17
17
|
context "when using GBP" do
|
18
18
|
before do
|
19
|
-
|
19
|
+
stub_spree_preferences(currency: "GBP")
|
20
20
|
end
|
21
21
|
|
22
22
|
context "when order is in delivery" do
|
@@ -18,7 +18,7 @@ describe Spree::HomeController, type: :controller do
|
|
18
18
|
end
|
19
19
|
|
20
20
|
context "different layout specified in config" do
|
21
|
-
before {
|
21
|
+
before { stub_spree_preferences(layout: 'layouts/application') }
|
22
22
|
|
23
23
|
it "renders specified layout" do
|
24
24
|
get :index
|