Files
openfoodnetwork/spec/controllers/shops_controller_spec.rb
Rohan Mitchell 610a4c03fe Merge branch 'master' into redesign
Conflicts:
	app/controllers/home_controller.rb
	app/views/producers/index.html.haml
	app/views/shared/menu/_mobile_menu.html.haml
	app/views/shop/products/_form.html.haml
	config/routes.rb
	spec/controllers/shops_controller_spec.rb
2015-06-10 18:27:50 +10:00

18 lines
508 B
Ruby

require 'spec_helper'
describe ShopsController do
render_views
let!(:distributor) { create(:distributor_enterprise) }
let!(:invisible_distributor) { create(:distributor_enterprise, visible: false) }
before do
Enterprise.stub(:distributors_with_active_order_cycles) { [distributor] }
end
# Exclusion from actual rendered view handled in features/consumer/home
it "shows JSON for invisible hubs" do
get :index
response.body.should have_content invisible_distributor.name
end
end