Sha256: 7cc3e16f30bcd968e3db398c01c85327ae40fe00252079888791be6986968c2c

Contents?: true

Size: 935 Bytes

Versions: 8

Compression:

Stored size: 935 Bytes

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 Admin::FieldGroupsHelper do
  it "should return the correct info text about tag restrictions and classes for groups" do
    field_group = FactoryGirl.build(:field_group, :klass_name => "Contact", :label => "Test Field Group")
    html = field_group_subtitle(field_group)
    html.should include("Test Field Group")
    html.should include("This field group applies to contacts tagged with")
    field_group.tag = nil
    field_group.klass_name = "Account"
    field_group_subtitle(field_group).should include("This field group applies to all accounts")
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
fat_free_crm-0.13.3 spec/helpers/admin/field_groups_helper_spec.rb
fat_free_crm-0.13.2 spec/helpers/admin/field_groups_helper_spec.rb
fat_free_crm-0.12.3 spec/helpers/admin/field_groups_helper_spec.rb
fat_free_crm-0.12.2 spec/helpers/admin/field_groups_helper_spec.rb
fat_free_crm-0.13.1 spec/helpers/admin/field_groups_helper_spec.rb
fat_free_crm-0.12.1 spec/helpers/admin/field_groups_helper_spec.rb
fat_free_crm-0.13.0 spec/helpers/admin/field_groups_helper_spec.rb
fat_free_crm-0.12.0 spec/helpers/admin/field_groups_helper_spec.rb