Sha256: 8f25ac89c4ec3843d27dd8f6717719735f6c940bda9bba0e626b98f0e3385504
Contents?: true
Size: 1.07 KB
Versions: 4
Compression:
Stored size: 1.07 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 [activity] template with @activities collection" do assign(:activities, [ FactoryGirl.create(:version, :id => 42, :event => "update", :item => FactoryGirl.create(:account), :whodunnit => current_user.id.to_s) ]) render :template => 'home/index', :formats => [:js] rendered.should include("$('#activities').html") rendered.should include("li class=\\'version\\' id=\\'version_42\\'") end it "should render a message if there're no activities" do assign(:activities, []) render :template => 'home/index', :formats => [:js] rendered.should include("No activity records found.") end end
Version data entries
4 entries across 4 versions & 1 rubygems