# Copyright (c) 2008-2013 Michael Dvorkin and contributors. # # Fat Free CRM is freely distributable under the terms of MIT license. # See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php #------------------------------------------------------------------------------ require 'spec_helper' describe "/campaigns/index" do include CampaignsHelper before do login_and_assign end it "should render [campaign] template with @campaigns collection if there are campaigns" do assign(:campaigns, [ FactoryGirl.create(:campaign, :id => 42) ].paginate) render :template => 'campaigns/index', :formats => [:js] rendered.should include("jQuery('#campaigns').html('
  • 'campaigns/index', :formats => [:js] rendered.should include("jQuery('#campaigns').html('
    ") rendered.should include("#paginate") end end