Files
openfoodnetwork/spec/controllers/producers_controller_spec.rb
2014-11-01 10:39:29 +11:00

17 lines
422 B
Ruby

require 'spec_helper'
describe ProducersController do
let!(:distributor) { create(:distributor_enterprise) }
before do
Enterprise.stub_chain(:distributors_with_active_order_cycles, :ready_for_checkout).
and_return([distributor])
Enterprise.stub(:all).and_return([distributor])
end
it "sets active distributors" do
get :index
assigns[:active_distributors].should == [distributor]
end
end