diff --git a/app/overrides/display_payment_information_after_purchase.rb b/app/overrides/display_payment_information_after_purchase.rb new file mode 100644 index 0000000000..d687e4e0f7 --- /dev/null +++ b/app/overrides/display_payment_information_after_purchase.rb @@ -0,0 +1,4 @@ +Deface::Override.new(:virtual_path => "spree/shared/_order_details", + :replace => "div.payment-info", + :partial => "spree/shared/order_details_payment_info", + :name => "order_details_payment_info") diff --git a/app/views/spree/shared/_order_details_payment_info.html.haml b/app/views/spree/shared/_order_details_payment_info.html.haml new file mode 100644 index 0000000000..9347237324 --- /dev/null +++ b/app/views/spree/shared/_order_details_payment_info.html.haml @@ -0,0 +1,2 @@ +- if order.payment_method.type == "Spree::PaymentMethod::Check" + = simple_format order.payment_method.description diff --git a/spec/requests/consumer/checkout_spec.rb b/spec/requests/consumer/checkout_spec.rb index 6c33d4c78b..e1e9c02eed 100644 --- a/spec/requests/consumer/checkout_spec.rb +++ b/spec/requests/consumer/checkout_spec.rb @@ -36,7 +36,7 @@ feature %q{ c = Spree::Country.find_by_name('Australia') Spree::ZoneMember.create(:zoneable => c, :zone => @zone) create(:itemwise_shipping_method, zone: @zone) - create(:payment_method) + create(:payment_method, :description => 'Cheque payment method') end @@ -90,7 +90,11 @@ feature %q{ # -- Checkout: Payment click_button 'Save and Continue' + # -- Checkout: Order complete page.should have_content('Your order has been processed successfully') + page.should have_content('Cheque payment method') + + # page.should have_content('Your order will be available on:') # page.should have_content('On Tuesday, 4 PM') # page.should have_content('12 Bungee Rd, Carion')