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:
Diffstat (limited to 'spec/scripts/internal_events/cli_spec.rb')
-rw-r--r--spec/scripts/internal_events/cli_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/scripts/internal_events/cli_spec.rb b/spec/scripts/internal_events/cli_spec.rb
index 54169e0dc2d..30d4db7d195 100644
--- a/spec/scripts/internal_events/cli_spec.rb
+++ b/spec/scripts/internal_events/cli_spec.rb
@@ -89,6 +89,18 @@ RSpec.describe Cli, feature_category: :service_ping do
YAML.safe_load(File.read('spec/fixtures/scripts/internal_events/new_events.yml')).each do |test_case|
it_behaves_like 'creates the right defintion files', test_case['description'], test_case
end
+
+ context 'with invalid event name' do
+ it 'prompts user to select another name' do
+ queue_cli_inputs([
+ "1\n", # Enum-select: New Event -- start tracking when an action or scenario occurs on gitlab instances
+ "Engineer uses Internal Event CLI to define a new event\n", # Submit description
+ "badDDD_ event (name) with // prob.lems\n" # Submit action name
+ ])
+
+ expect_cli_output { prompt.output.string.include?('Invalid event name.') }
+ end
+ end
end
context 'when creating new metrics' do