Sha256: b8a8b978a01933365f683f501cec05839a55afdf78417cbeeb3575125f970d45
Contents?: true
Size: 1.25 KB
Versions: 2
Compression:
Stored size: 1.25 KB
Contents
# frozen_string_literal: true # 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 "/accounts/_new" do include AccountsHelper before do login assign(:account, Account.new) assign(:users, [current_user]) end it "should render [create account] form" do render expect(view).to render_template(partial: "_top_section") expect(view).to render_template(partial: "_contact_info") expect(view).to render_template(partial: "_permissions") expect(rendered).to have_tag('form[class="simple_form new_account"]') end it "should render background info field if settings require so" do Setting.background_info = [:account] render expect(rendered).to have_tag("textarea[id=account_background_info]") end it "should not render background info field if settings do not require so" do Setting.background_info = [] render expect(rendered).not_to have_tag("textarea[id=account_background_info]") end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fat_free_crm-0.20.1 | spec/views/accounts/_new.haml_spec.rb |
fat_free_crm-0.20.0 | spec/views/accounts/_new.haml_spec.rb |