Sha256: 7266d20e27855a0e8c947b02772209ae4d30a710c3ae1a8c00483d74ab8f476c
Contents?: true
Size: 1.1 KB
Versions: 11
Compression:
Stored size: 1.1 KB
Contents
# 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.build_stubbed(:campaign, id: 42)].paginate) render template: 'campaigns/index', formats: [:js] expect(rendered).to include("$('#campaigns').html('<li class=\\'campaign highlight\\' id=\\'campaign_42\\'") expect(rendered).to include("#paginate") end it "should render [empty] template if @campaigns collection if there are no campaigns" do assign(:campaigns, [].paginate) render template: 'campaigns/index', formats: [:js] expect(rendered).to include("$('#campaigns').html('<div id=\\'empty\\'>") expect(rendered).to include("#paginate") end end
Version data entries
11 entries across 11 versions & 2 rubygems