Sha256: d69eb0ea50c2a55eb5fe2c73e3dc11c380dc57d287498ff7714c2f24dd22f0e4
Contents?: true
Size: 1.53 KB
Versions: 11
Compression:
Stored size: 1.53 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 "/leads/_edit" do include LeadsHelper before do login_and_assign assign(:lead, @lead = FactoryGirl.create(:lead)) assign(:users, [ current_user ]) assign(:campaign, @campaign = FactoryGirl.create(:campaign)) assign(:campaigns, [ @campaign ]) end it "should render [edit lead] form" do render view.should render_template(:partial => "leads/_top_section") view.should render_template(:partial => "leads/_status") view.should render_template(:partial => "leads/_contact") view.should render_template(:partial => "leads/_web") view.should render_template(:partial => "entities/_permissions") rendered.should have_tag("form[class=edit_lead]") do with_tag "input[type=hidden][id=lead_user_id][value=#{@lead.user_id}]" end end it "should render background info field if settings require so" do Setting.background_info = [ :lead ] render rendered.should have_tag("textarea[id=lead_background_info]") end it "should not render background info field if settings do not require so" do Setting.background_info = [] render rendered.should_not have_tag("textarea[id=lead_background_info]") end end
Version data entries
11 entries across 11 versions & 1 rubygems