mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-25 20:46:48 +00:00
18 lines
497 B
Ruby
18 lines
497 B
Ruby
require 'spec_helper'
|
|
|
|
describe GroupsController do
|
|
render_views
|
|
let(:enterprise) { create(:distributor_enterprise) }
|
|
let!(:group) { create(:enterprise_group, enterprises: [enterprise], on_front_page: true) }
|
|
it "gets all visible groups" do
|
|
EnterpriseGroup.stub_chain :on_front_page, :by_position
|
|
EnterpriseGroup.should_receive :on_front_page
|
|
get :index
|
|
end
|
|
|
|
it "loads all enterprises for group" do
|
|
get :index
|
|
response.body.should have_text enterprise.id
|
|
end
|
|
end
|