Sha256: 9f3fd0e471c168a8345034b94162688c20840ecdefacb03f11370363bca9760b

Contents?: true

Size: 948 Bytes

Versions: 15

Compression:

Stored size: 948 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 = helper.field_group_subtitle(field_group)
    expect(html).to include("Test Field Group")
    expect(html).to include("This field group applies to contacts tagged with")
    field_group.tag = nil
    field_group.klass_name = "Account"
    expect(field_group_subtitle(field_group)).to include("This field group applies to all accounts")
  end
end

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
fat_free_crm-0.14.2 spec/helpers/admin/field_groups_helper_spec.rb
fat_free_crm-0.15.2 spec/helpers/admin/field_groups_helper_spec.rb
fat_free_crm-0.16.4 spec/helpers/admin/field_groups_helper_spec.rb
fat_free_crm-0.14.1 spec/helpers/admin/field_groups_helper_spec.rb
fat_free_crm-0.15.1 spec/helpers/admin/field_groups_helper_spec.rb
fat_free_crm-0.16.3 spec/helpers/admin/field_groups_helper_spec.rb
fat_free_crm-0.16.2 spec/helpers/admin/field_groups_helper_spec.rb
fat_free_crm-0.16.1 spec/helpers/admin/field_groups_helper_spec.rb
fat_free_crm-0.16.0 spec/helpers/admin/field_groups_helper_spec.rb
fat_free_crm-0.15.0 spec/helpers/admin/field_groups_helper_spec.rb
fat_free_crm-0.15.0.beta.2 spec/helpers/admin/field_groups_helper_spec.rb
fat_free_crm-0.15.0.beta spec/helpers/admin/field_groups_helper_spec.rb
fat_free_crm-0.14.0 spec/helpers/admin/field_groups_helper_spec.rb
reduced_fat_crm-0.15.0.beta spec/helpers/admin/field_groups_helper_spec.rb
reduced_fat_crm-0.14.0 spec/helpers/admin/field_groups_helper_spec.rb