summaryrefslogtreecommitdiff
path: root/spec/models/analytics
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-11-05 21:08:51 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-11-05 21:08:51 +0000
commit1bc5af76617026dec53016cb0881ec834ccab807 (patch)
treed0bd460cfcf415248441a1ad79a8bf76b87aa27d /spec/models/analytics
parent3e1c760141a27097d74d191a619fa6edecd86fe7 (diff)
downloadgitlab-ce-1bc5af76617026dec53016cb0881ec834ccab807.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/analytics')
-rw-r--r--spec/models/analytics/devops_adoption/segment_spec.rb29
1 files changed, 0 insertions, 29 deletions
diff --git a/spec/models/analytics/devops_adoption/segment_spec.rb b/spec/models/analytics/devops_adoption/segment_spec.rb
deleted file mode 100644
index d7f74d5bf88..00000000000
--- a/spec/models/analytics/devops_adoption/segment_spec.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-RSpec.describe Analytics::DevopsAdoption::Segment, type: :model do
- subject { build(:devops_adoption_segment) }
-
- describe 'validation' do
- it { is_expected.to validate_presence_of(:name) }
- it { is_expected.to validate_uniqueness_of(:name) }
- it { is_expected.to validate_length_of(:name).is_at_most(255) }
-
- context 'limit the number of segments' do
- subject { build(:devops_adoption_segment) }
-
- before do
- create_list(:devops_adoption_segment, 2)
-
- stub_const("#{described_class}::ALLOWED_SEGMENT_COUNT", 2)
- end
-
- it 'shows validation error' do
- subject.validate
-
- expect(subject.errors[:name]).to eq([s_('DevopsAdoptionSegment|The maximum number of segments has been reached')])
- end
- end
- end
-end