Sha256: 9e1758755f310303b20872dc1264ae852c5087f984d4bfd6de13abc4fb19a315
Contents?: true
Size: 1.29 KB
Versions: 4
Compression:
Stored size: 1.29 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 "/contacts/new" do include ContactsHelper before do login_and_assign @account = FactoryGirl.create(:account) assign(:contact, Contact.new(:user => current_user)) assign(:users, [ current_user ]) assign(:account, @account) assign(:accounts, [ @account ]) end it "should toggle empty message div if it exists" do render rendered.should include('crm.flick("empty", "toggle")') end describe "new contact" do it "should render [new] template into :create_contact div" do params[:cancel] = nil render rendered.should have_rjs("create_contact") do |rjs| with_tag("form[class=new_contact]") end end end describe "cancel new contact" do it "should hide [create contact] form" do params[:cancel] = "true" render rendered.should_not have_rjs("create_contact") rendered.should include('crm.flip_form("create_contact");') end end end
Version data entries
4 entries across 4 versions & 1 rubygems