Sha256: 394998a312c0c07d1587a518f470a86427ef6aa11132bbfe01a63336c998a085
Contents?: true
Size: 1.31 KB
Versions: 11
Compression:
Stored size: 1.31 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 'spec_helper' describe "/campaigns/_edit" do include CampaignsHelper before do login_and_assign assign(:campaign, @campaign = FactoryGirl.create(:campaign)) assign(:users, [ current_user ]) end it "should render [edit campaign] form" do render view.should render_template(:partial => "campaigns/_top_section") view.should render_template(:partial => "campaigns/_objectives") view.should render_template(:partial => "_permissions") view.should have_tag("form[class=edit_campaign]") do with_tag "input[type=hidden][id=campaign_user_id][value=#{@campaign.user_id}]" end end it "should render background info field if settings require so" do Setting.background_info = [ :campaign ] render rendered.should have_tag("textarea[id=campaign_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=campaign_background_info]") end end
Version data entries
11 entries across 11 versions & 1 rubygems