mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Fix params issue in ReportsController expectation
This commit is contained in:
@@ -228,7 +228,7 @@ describe Spree::Admin::ReportsController, type: :controller do
|
||||
it "creates a ProductAndInventoryReport" do
|
||||
expect(OpenFoodNetwork::ProductsAndInventoryReport).to receive(:new)
|
||||
.with(@admin_user,
|
||||
{ "test" => "foo", "controller" => "spree/admin/reports",
|
||||
{ "test" => "foo", "controller" => "spree/admin/reports", "report" => {},
|
||||
"action" => "products_and_inventory", "use_route" => "main_app" }, false)
|
||||
.and_return(report = double(:report))
|
||||
allow(report).to receive(:header).and_return []
|
||||
@@ -281,7 +281,8 @@ describe Spree::Admin::ReportsController, type: :controller do
|
||||
it "creates a CustomersReport" do
|
||||
expect(OpenFoodNetwork::CustomersReport).to receive(:new)
|
||||
.with(@admin_user, { "test" => "foo", "controller" => "spree/admin/reports",
|
||||
"action" => "customers", "use_route" => "main_app" }, false)
|
||||
"action" => "customers", "use_route" => "main_app",
|
||||
"report" => {} }, false)
|
||||
.and_return(report = double(:report))
|
||||
allow(report).to receive(:header).and_return []
|
||||
allow(report).to receive(:table).and_return []
|
||||
|
||||
Reference in New Issue
Block a user