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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-07 15:06:18 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-07 15:06:18 +0300
commit185f428fa5e6123ffa0f29e307523da138e7b028 (patch)
tree1d5bb1d4700c0953aed2ad0e5d3515cc7935e550 /spec/support
parentab2382923e7a864a3fa27fdf8eeb9b21893b9147 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/shared_examples/cycle_analytics_stage_examples.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/support/shared_examples/cycle_analytics_stage_examples.rb b/spec/support/shared_examples/cycle_analytics_stage_examples.rb
index 151f5325e84..dc2ea229171 100644
--- a/spec/support/shared_examples/cycle_analytics_stage_examples.rb
+++ b/spec/support/shared_examples/cycle_analytics_stage_examples.rb
@@ -46,6 +46,13 @@ shared_examples_for 'cycle analytics stage' do
expect(stage).not_to be_valid
expect(stage.errors.details[:end_event]).to eq([{ error: :not_allowed_for_the_given_start_event }])
end
+
+ context 'disallows default stage names when creating custom stage' do
+ let(:invalid_params) { valid_params.merge(name: Gitlab::Analytics::CycleAnalytics::DefaultStages.names.first, custom: true) }
+ let(:stage) { described_class.new(invalid_params) }
+
+ it { expect(stage).not_to be_valid }
+ end
end
describe '#subject_model' do