summaryrefslogtreecommitdiff
path: root/spec/helpers/groups/crm_settings_helper_spec.rb
blob: 6376cabda3ac7e34c36a911d0e34707671e3332c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe Groups::CrmSettingsHelper do
  let_it_be(:group) { create(:group) }

  describe '#crm_feature_flag_enabled?' do
    subject do
      helper.crm_feature_flag_enabled?(group)
    end

    context 'when feature flag is enabled' do
      it { is_expected.to be_truthy }
    end

    context 'when feature flag is disabled' do
      before do
        stub_feature_flags(customer_relations: false)
      end

      it { is_expected.to be_falsy }
    end
  end
end