From 2c05478b2f6e413a8c38985a7e8f8bf977d91ed9 Mon Sep 17 00:00:00 2001 From: Luis Ramos Date: Sat, 10 Apr 2021 15:25:08 +0100 Subject: [PATCH] Adapt routes and helpers to make view spec green --- app/views/spree/admin/orders/_filters.html.haml | 2 +- app/views/spree/admin/orders/index.html.haml | 2 +- spec/views/spree/admin/orders/index.html.haml_spec.rb | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/views/spree/admin/orders/_filters.html.haml b/app/views/spree/admin/orders/_filters.html.haml index 0302489fd3..dead6051d9 100644 --- a/app/views/spree/admin/orders/_filters.html.haml +++ b/app/views/spree/admin/orders/_filters.html.haml @@ -1,5 +1,5 @@ %div{"data-hook" => "admin_orders_index_search"} - = form_tag :admin_orders, {name: "orders_form", "ng-submit" => "fetchResults()"} do + = form_tag spree.admin_orders_url, {name: "orders_form", "ng-submit" => "fetchResults()"} do .field-block.alpha.four.columns .date-range-filter.field = label_tag nil, t(:date_range) diff --git a/app/views/spree/admin/orders/index.html.haml b/app/views/spree/admin/orders/index.html.haml index 70f8cf5864..758fc4dd07 100644 --- a/app/views/spree/admin/orders/index.html.haml +++ b/app/views/spree/admin/orders/index.html.haml @@ -3,7 +3,7 @@ - content_for :page_actions do %li - = button_link_to t('.new_order'), new_admin_order_url, icon: 'icon-plus', id: 'admin_new_order' + = button_link_to t('.new_order'), spree.new_admin_order_url, icon: 'icon-plus', id: 'admin_new_order' = render partial: 'spree/admin/shared/order_sub_menu' diff --git a/spec/views/spree/admin/orders/index.html.haml_spec.rb b/spec/views/spree/admin/orders/index.html.haml_spec.rb index d9556bd76a..9087a07b09 100644 --- a/spec/views/spree/admin/orders/index.html.haml_spec.rb +++ b/spec/views/spree/admin/orders/index.html.haml_spec.rb @@ -3,6 +3,9 @@ require "spec_helper" describe "spree/admin/orders/index.html.haml" do + helper Spree::Admin::NavigationHelper + helper EnterprisesHelper + around do |example| original_config = Spree::Config[:enable_invoices?] example.run