Sha256: 70736c650693a486917b585e24ba25cf62e11b688506d670e23c036807d87a49
Contents?: true
Size: 1.17 KB
Versions: 2
Compression:
Stored size: 1.17 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 File.expand_path(File.dirname(__FILE__) + '/../../spec_helper') describe "/home/index" do include HomeHelper before do login end it "should render list of activities if it's not empty" do assign(:activities, [build_stubbed(:version, event: "update", item: build_stubbed(:account))]) assign(:my_tasks, []) assign(:my_opportunities, []) assign(:my_accounts, []) render template: 'home/index', formats: [:html] expect(view).to render_template(partial: "_activity") end it "should render a message if there're no activities" do assign(:activities, []) assign(:my_tasks, []) assign(:my_opportunities, []) assign(:my_accounts, []) render template: 'home/index', formats: [:html] expect(view).not_to render_template(partial: "_activity") expect(rendered).to include("No activity records found.") end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fat_free_crm-0.20.1 | spec/views/home/index.haml_spec.rb |
fat_free_crm-0.20.0 | spec/views/home/index.haml_spec.rb |