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>2023-07-26 00:10:25 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-07-26 00:10:25 +0300
commit5edc7a04de12237658e7149385661aede45d681c (patch)
treea7dcee962fcb9a11ffa15e673d772f237629fcdd /spec/graphql
parenta653b30df71fcbe5be7dd30f34622500e527b5ea (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/graphql')
-rw-r--r--spec/graphql/resolvers/metrics/dashboards/annotation_resolver_spec.rb34
1 files changed, 4 insertions, 30 deletions
diff --git a/spec/graphql/resolvers/metrics/dashboards/annotation_resolver_spec.rb b/spec/graphql/resolvers/metrics/dashboards/annotation_resolver_spec.rb
index 2ca194d519c..16e619cf9cd 100644
--- a/spec/graphql/resolvers/metrics/dashboards/annotation_resolver_spec.rb
+++ b/spec/graphql/resolvers/metrics/dashboards/annotation_resolver_spec.rb
@@ -30,36 +30,6 @@ RSpec.describe Resolvers::Metrics::Dashboards::AnnotationResolver, feature_categ
end
context 'with annotation records' do
- let_it_be(:annotation_1) { create(:metrics_dashboard_annotation, environment: environment, starting_at: 9.minutes.ago, dashboard_path: path) }
-
- it 'loads annotations with usage of finder class', :aggregate_failures do
- expect_next_instance_of(::Metrics::Dashboards::AnnotationsFinder, dashboard: dashboard, params: args) do |finder|
- expect(finder).to receive(:execute).and_return [annotation_1]
- end
-
- expect(resolve_annotations).to eql [annotation_1]
- end
-
- context 'dashboard is missing' do
- let(:dashboard) { nil }
-
- it 'returns empty array', :aggregate_failures do
- expect(::Metrics::Dashboards::AnnotationsFinder).not_to receive(:new)
-
- expect(resolve_annotations).to be_empty
- end
- end
-
- context 'there are no annotations records' do
- it 'returns empty array' do
- allow_next_instance_of(::Metrics::Dashboards::AnnotationsFinder) do |finder|
- allow(finder).to receive(:execute).and_return []
- end
-
- expect(resolve_annotations).to be_empty
- end
- end
-
context 'when metrics dashboard feature is unavailable' do
before do
stub_feature_flags(remove_monitor_metrics: true)
@@ -69,6 +39,10 @@ RSpec.describe Resolvers::Metrics::Dashboards::AnnotationResolver, feature_categ
expect(resolve_annotations).to be_nil
end
end
+
+ it 'returns [] all the time' do
+ expect(resolve_annotations).to be_empty
+ end
end
end
end