Fix params issue in ReportsController expectation

This commit is contained in:
Matt-Yorkley
2021-01-23 14:28:31 +00:00
parent e46fe3735b
commit ec597aab1a

View File

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