Sha256: 70db11a8dd3a4c6fdeec256ff9195e3da18ec412fe36b84311f3aefaeb0a3420
Contents?: true
Size: 1.05 KB
Versions: 11
Compression:
Stored size: 1.05 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 "/accounts/index" do include AccountsHelper before do login_and_assign end it "should render [account] template with @accounts collection if there are accounts" do assign(:accounts, [FactoryGirl.build_stubbed(:account, id: 42)].paginate) render template: 'accounts/index', formats: [:js] expect(rendered).to include("$('#accounts').html") expect(rendered).to include("$('#paginate').html") end it "should render [empty] template if @accounts collection if there are no accounts" do assign(:accounts, [].paginate) render template: 'accounts/index', formats: [:js] expect(rendered).to include("$('#accounts').html('<div id=\\'empty\\'") expect(rendered).to include("$('#paginate').html") end end
Version data entries
11 entries across 11 versions & 2 rubygems