diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-19 14:01:45 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-19 14:01:45 +0300 |
commit | 9297025d0b7ddf095eb618dfaaab2ff8f2018d8b (patch) | |
tree | 865198c01d1824a9b098127baa3ab980c9cd2c06 /spec/services/product_analytics/build_activity_graph_service_spec.rb | |
parent | 6372471f43ee03c05a7c1f8b0c6ac6b8a7431dbe (diff) |
Add latest changes from gitlab-org/gitlab@16-7-stable-eev16.7.0-rc42
Diffstat (limited to 'spec/services/product_analytics/build_activity_graph_service_spec.rb')
-rw-r--r-- | spec/services/product_analytics/build_activity_graph_service_spec.rb | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/spec/services/product_analytics/build_activity_graph_service_spec.rb b/spec/services/product_analytics/build_activity_graph_service_spec.rb deleted file mode 100644 index 2eb35523da7..00000000000 --- a/spec/services/product_analytics/build_activity_graph_service_spec.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe ProductAnalytics::BuildActivityGraphService, feature_category: :product_analytics_data_management do - let_it_be(:project) { create(:project) } - let_it_be(:time_now) { Time.zone.now } - let_it_be(:time_ago) { Time.zone.now - 5.days } - - let_it_be(:events) do - [ - create(:product_analytics_event, project: project, collector_tstamp: time_now), - create(:product_analytics_event, project: project, collector_tstamp: time_now), - create(:product_analytics_event, project: project, collector_tstamp: time_now), - create(:product_analytics_event, project: project, collector_tstamp: time_ago), - create(:product_analytics_event, project: project, collector_tstamp: time_ago) - ] - end - - let(:params) { { timerange: 7 } } - - subject { described_class.new(project, params).execute } - - it 'returns a valid graph hash' do - expected_hash = { - id: 'collector_tstamp', - keys: [time_ago.to_date, time_now.to_date], - values: [2, 3] - } - - expect(subject).to eq(expected_hash) - end -end |