mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-01 02:03:22 +00:00
Fix view rendering in Api::BaseController
This commit is contained in:
@@ -10,6 +10,9 @@ module Api
|
||||
include Spree::Core::ControllerHelpers::SSL
|
||||
include ::ActionController::Head
|
||||
include ::ActionController::ConditionalGet
|
||||
include ActionView::Layouts
|
||||
|
||||
layout false
|
||||
|
||||
attr_accessor :current_api_user
|
||||
|
||||
|
||||
@@ -154,7 +154,8 @@ module Api
|
||||
allow_any_instance_of(OrderCycle).to receive(:open?) { false }
|
||||
end
|
||||
|
||||
xit "throws an error, ActionView::MissingTemplate: Missing template api/order_cycles/products" do
|
||||
# Regression test for https://github.com/openfoodfoundation/openfoodnetwork/issues/6491
|
||||
it "renders no products without error" do
|
||||
api_get :products, id: order_cycle.id, distributor: distributor.id
|
||||
|
||||
expect(json_response).to eq({})
|
||||
|
||||
Reference in New Issue
Block a user