Sha256: 4cb2ec2ec3b9f81eb1fe901b59dc5fb01d44ea5ab1742429422376c7d8f648fa
Contents?: true
Size: 1.08 KB
Versions: 4
Compression:
Stored size: 1.08 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 File.expand_path(File.dirname(__FILE__) + '/../../spec_helper') describe "/home/index" do include HomeHelper before do login_and_assign end it "should render list of activities if it's not empty" do assign(:activities, [FactoryGirl.create(:version, event: "update", item: FactoryGirl.create(:account))]) assign(:my_tasks, []) assign(:my_opportunities, []) assign(:my_accounts, []) render 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 expect(view).not_to render_template(partial: "_activity") expect(rendered).to include("No activity records found.") end end
Version data entries
4 entries across 4 versions & 2 rubygems