diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-24 21:10:18 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-24 21:10:18 +0300 |
commit | 84cacdae74db0de90cf88ceef2191f399e9659b2 (patch) | |
tree | 679f359bde918dd341b70937a9cf5e115851ff89 /spec/models | |
parent | cb9b55e662d4164d913ef7031adc135d3ea4d9f0 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/incident_management/timeline_event_tag_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/models/incident_management/timeline_event_tag_spec.rb b/spec/models/incident_management/timeline_event_tag_spec.rb index cff8ad8469f..9dbb78a6d82 100644 --- a/spec/models/incident_management/timeline_event_tag_spec.rb +++ b/spec/models/incident_management/timeline_event_tag_spec.rb @@ -25,4 +25,18 @@ RSpec.describe IncidentManagement::TimelineEventTag do it { is_expected.not_to allow_value('').for(:name) } it { is_expected.not_to allow_value('s' * 256).for(:name) } end + + describe '.pluck_names' do + it 'returns the names of the tags' do + tag1 = create(:incident_management_timeline_event_tag) + tag2 = create(:incident_management_timeline_event_tag) + + expect(described_class.pluck_names).to contain_exactly(tag1.name, tag2.name) + end + end + + describe 'constants' do + it { expect(described_class::START_TIME_TAG_NAME).to eq('Start time') } + it { expect(described_class::END_TIME_TAG_NAME).to eq('End time') } + end end |