summaryrefslogtreecommitdiff
path: root/spec/tasks/gitlab/usage_data_rake_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/tasks/gitlab/usage_data_rake_spec.rb')
-rw-r--r--spec/tasks/gitlab/usage_data_rake_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/tasks/gitlab/usage_data_rake_spec.rb b/spec/tasks/gitlab/usage_data_rake_spec.rb
index f54d06f406f..7ddba4ceb9b 100644
--- a/spec/tasks/gitlab/usage_data_rake_spec.rb
+++ b/spec/tasks/gitlab/usage_data_rake_spec.rb
@@ -69,6 +69,15 @@ RSpec.describe 'gitlab:usage data take tasks', :silence_stdout do
expect { run_rake_task('gitlab:usage_data:generate_and_send') }.to output(/.*201.*/).to_stdout
end
+ describe 'generate_ci_template_events' do
+ it "generates #{Gitlab::UsageDataCounters::CiTemplateUniqueCounter::KNOWN_EVENTS_FILE_PATH}" do
+ FileUtils.rm_rf(Gitlab::UsageDataCounters::CiTemplateUniqueCounter::KNOWN_EVENTS_FILE_PATH)
+ run_rake_task('gitlab:usage_data:generate_ci_template_events')
+
+ expect(File.exist?(Gitlab::UsageDataCounters::CiTemplateUniqueCounter::KNOWN_EVENTS_FILE_PATH)).to be true
+ end
+ end
+
private
def stub_response(url: service_ping_payload_url, body:, status: 201)