Commit 45a5ed6d authored by Shinya Maeda's avatar Shinya Maeda

fix wording

parent bec4740f
require 'spec_helper'
describe Ci::BuildMetadata do
it_behaves_like 'Unique enum values'
it_behaves_like 'having unique enum values'
set(:user) { create(:user) }
set(:group) { create(:group, :access_requestable) }
......
......@@ -3,7 +3,7 @@ require 'spec_helper'
describe Ci::BuildTraceChunk, :clean_gitlab_redis_shared_state do
include ExclusiveLeaseHelpers
it_behaves_like 'Unique enum values'
it_behaves_like 'having unique enum values'
set(:build) { create(:ci_build, :running) }
let(:chunk_index) { 0 }
......
require 'spec_helper'
describe Ci::JobArtifact do
it_behaves_like 'Unique enum values'
it_behaves_like 'having unique enum values'
let(:artifact) { create(:ci_job_artifact, :archive) }
......
require 'spec_helper'
describe Ci::Pipeline, :mailer do
it_behaves_like 'Unique enum values'
it_behaves_like 'having unique enum values'
let(:user) { create(:user) }
set(:project) { create(:project) }
......
require 'spec_helper'
describe Ci::Runner do
it_behaves_like 'Unique enum values'
it_behaves_like 'having unique enum values'
describe 'validation' do
it { is_expected.to validate_presence_of(:access_level) }
......
require 'spec_helper'
describe Ci::Stage, :models do
it_behaves_like 'Unique enum values'
it_behaves_like 'having unique enum values'
let(:stage) { create(:ci_stage_entity) }
......
require 'rails_helper'
describe Clusters::Applications::Ingress do
it_behaves_like 'Unique enum values'
it_behaves_like 'having unique enum values'
let(:ingress) { create(:clusters_applications_ingress) }
......
......@@ -3,7 +3,7 @@
require 'spec_helper'
describe Clusters::Cluster do
it_behaves_like 'Unique enum values'
it_behaves_like 'having unique enum values'
it { is_expected.to belong_to(:user) }
it { is_expected.to have_many(:cluster_projects) }
......
......@@ -4,7 +4,7 @@ describe Clusters::Platforms::Kubernetes, :use_clean_rails_memory_store_caching
include KubernetesHelpers
include ReactiveCachingHelpers
it_behaves_like 'Unique enum values'
it_behaves_like 'having unique enum values'
it { is_expected.to belong_to(:cluster) }
it { is_expected.to be_kind_of(Gitlab::Kubernetes) }
......
require 'spec_helper'
describe CommitStatus do
it_behaves_like 'Unique enum values'
it_behaves_like 'having unique enum values'
set(:project) { create(:project, :repository) }
......
......@@ -16,7 +16,7 @@ describe Deployment do
it { is_expected.to validate_presence_of(:ref) }
it { is_expected.to validate_presence_of(:sha) }
it_behaves_like 'Unique enum values'
it_behaves_like 'having unique enum values'
describe '#scheduled_actions' do
subject { deployment.scheduled_actions }
......
require 'rails_helper'
RSpec.describe GpgSignature do
it_behaves_like 'Unique enum values'
it_behaves_like 'having unique enum values'
let(:commit_sha) { '0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33' }
let!(:project) { create(:project, :repository, path: 'sample-project') }
......
require 'spec_helper'
describe InternalId do
it_behaves_like 'Unique enum values'
it_behaves_like 'having unique enum values'
let(:project) { create(:project) }
let(:usage) { :issues }
......
require 'rails_helper'
describe List do
it_behaves_like 'Unique enum values'
it_behaves_like 'having unique enum values'
describe 'relationships' do
it { is_expected.to belong_to(:board) }
......
require 'rails_helper'
RSpec.describe NotificationSetting do
it_behaves_like 'Unique enum values'
it_behaves_like 'having unique enum values'
describe "Associations" do
it { is_expected.to belong_to(:user) }
......
require 'spec_helper'
describe ProjectAutoDevops do
it_behaves_like 'Unique enum values'
it_behaves_like 'having unique enum values'
set(:project) { build(:project) }
......
......@@ -4,7 +4,7 @@ describe Project do
include ProjectForksHelper
include GitHelpers
it_behaves_like 'Unique enum values'
it_behaves_like 'having unique enum values'
describe 'associations' do
it { is_expected.to belong_to(:group) }
......
......@@ -3,7 +3,7 @@
require 'spec_helper'
describe PrometheusMetric do
it_behaves_like 'Unique enum values'
it_behaves_like 'having unique enum values'
subject { build(:prometheus_metric) }
let(:other_project) { build(:project) }
......
require 'spec_helper'
describe PushEventPayload do
it_behaves_like 'Unique enum values'
it_behaves_like 'having unique enum values'
describe 'saving payloads' do
it 'does not allow commit messages longer than 70 characters' do
......
......@@ -3,7 +3,7 @@
require 'rails_helper'
RSpec.describe ResourceLabelEvent, type: :model do
it_behaves_like 'Unique enum values'
it_behaves_like 'having unique enum values'
subject { build(:resource_label_event, issue: issue) }
let(:issue) { create(:issue) }
......
require 'rails_helper'
describe UserCallout do
it_behaves_like 'Unique enum values'
it_behaves_like 'having unique enum values'
let!(:callout) { create(:user_callout) }
......
......@@ -4,7 +4,7 @@ describe User do
include ProjectForksHelper
include TermsHelper
it_behaves_like 'Unique enum values'
it_behaves_like 'having unique enum values'
describe 'modules' do
subject { described_class }
......
# frozen_string_literal: true
shared_examples 'Unique enum values' do
shared_examples 'having unique enum values' do
described_class.defined_enums.each do |name, enum|
it "has unique values in #{name.inspect}" do
duplicated = enum.group_by(&:last).select { |key, value| value.size > 1 }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment