Bulk Order Management works with navigation helper override

This commit is contained in:
Rob H
2014-09-06 00:34:27 +10:00
parent 780df6bfe0
commit ee4a1925fe
3 changed files with 12 additions and 7 deletions

View File

@@ -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

View File

@@ -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'

View File

@@ -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