Sha256: 241794cf702fedb8b5d54a0dcec5f3bf95f7b965f5abb97e35ced621d8a30eae
Contents?: true
Size: 1.09 KB
Versions: 11
Compression:
Stored size: 1.09 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 view.should 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 view.should_not render_template(:partial => "_activity") rendered.should include("No activity records found.") end end
Version data entries
11 entries across 11 versions & 1 rubygems