Sha256: 8fd0a9588587ee4b04a68d1758b81a8ef34d415bc6b472c1edf35c1081dcf998
Contents?: true
Size: 1.06 KB
Versions: 7
Compression:
Stored size: 1.06 KB
Contents
# frozen_string_literal: true # 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 end it "should render [account] template with @accounts collection if there are accounts" do assign(:accounts, [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
7 entries across 7 versions & 1 rubygems