mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Bulk Order Management works with navigation helper override
This commit is contained in:
@@ -8,6 +8,7 @@ module Spree
|
||||
klass = klass_for_without_sym_fallback(name)
|
||||
klass ||= name.singularize.to_sym
|
||||
klass = :overview if klass == :dashboard
|
||||
klass = Spree::Order if klass == :bulk_order_management
|
||||
klass
|
||||
end
|
||||
alias_method_chain :klass_for, :sym_fallback
|
||||
|
||||
@@ -15,13 +15,6 @@ feature %q{
|
||||
admin_user = quick_login_as_admin
|
||||
end
|
||||
|
||||
it "displays a Bulk Management Tab under the Orders item" do
|
||||
visit '/admin/orders'
|
||||
page.should have_link "Bulk Order Management"
|
||||
click_link "Bulk Order Management"
|
||||
page.should have_selector "h1.page-title", text: "Bulk Order Management"
|
||||
end
|
||||
|
||||
it "displays a message when number of line items is zero" do
|
||||
visit '/admin/orders/bulk_management'
|
||||
page.should have_text "No orders found."
|
||||
@@ -586,6 +579,13 @@ feature %q{
|
||||
quick_login_as @enterprise_user
|
||||
end
|
||||
|
||||
it "displays a Bulk Management Tab under the Orders item" do
|
||||
visit '/admin/orders'
|
||||
page.should have_link "Bulk Order Management"
|
||||
click_link "Bulk Order Management"
|
||||
page.should have_selector "h1.page-title", text: "Bulk Order Management"
|
||||
end
|
||||
|
||||
it "shows only line item from orders that I distribute, and not those that I supply" do
|
||||
visit '/admin/orders/bulk_management'
|
||||
|
||||
|
||||
@@ -15,6 +15,10 @@ module Spree
|
||||
it "returns :overview for the dashboard" do
|
||||
helper.klass_for('dashboard').should == :overview
|
||||
end
|
||||
|
||||
it "returns Spree::Order for bulk_order_management" do
|
||||
helper.klass_for('bulk_order_management').should == Spree::Order
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user