Loading managed shops into standing orders index, to be used for filtering

This commit is contained in:
Rob Harrington
2016-10-07 10:07:55 +11:00
parent 8372317a8f
commit 24cb823c90
2 changed files with 8 additions and 2 deletions

View File

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