Welcome to mirror list, hosted at ThFree Co, Russian Federation.

plan_limits_helper_spec.rb « helpers « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b25e97150f8e65fa32abf0c2ec4170e47d8ade49 (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
26
27
28
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe PlanLimitsHelper, feature_category: :continuous_integration do
  describe '#plan_limit_setting_description' do
    it 'describes known limits', :aggregate_failures do
      [
        :ci_pipeline_size,
        :ci_active_jobs,
        :ci_project_subscriptions,
        :ci_pipeline_schedules,
        :ci_needs_size_limit,
        :ci_registered_group_runners,
        :ci_registered_project_runners,
        :pipeline_hierarchy_size
      ].each do |limit_name|
        expect(helper.plan_limit_setting_description(limit_name)).to be_present
      end
    end

    it 'raises an ArgumentError on invalid arguments' do
      expect { helper.plan_limit_setting_description(:some_invalid_limit) }.to(
        raise_error(ArgumentError, /No description/)
      )
    end
  end
end