mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-02 21:57:17 +00:00
Loading managed shops into standing orders index, to be used for filtering
This commit is contained in:
@@ -25,10 +25,11 @@ describe Admin::StandingOrdersController, type: :controller do
|
||||
context 'as an enterprise user' do
|
||||
before { shop.update_attributes(owner: user) }
|
||||
|
||||
it 'renders the index page without loading any data' do
|
||||
it 'renders the index page with appropriate data' do
|
||||
spree_get :index, params
|
||||
expect(response).to render_template 'index'
|
||||
expect(assigns(:collection)).to eq []
|
||||
expect(assigns(:collection)).to eq [] # No collection loaded
|
||||
expect(assigns(:shops)).to eq [shop] # Shops are loaded
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user