diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-13 18:07:15 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-13 18:07:15 +0300 |
commit | f62886ebffeda00b6972f1644097a6b9f5016453 (patch) | |
tree | 1626fb8ad823b781d2e0164211cc7a6a9633edc2 /spec/helpers | |
parent | da104bbfec951988c5da3aa495091a31b7312aac (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/helpers')
-rw-r--r-- | spec/helpers/projects/observability_helper_spec.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/spec/helpers/projects/observability_helper_spec.rb b/spec/helpers/projects/observability_helper_spec.rb new file mode 100644 index 00000000000..65b6ddf04ec --- /dev/null +++ b/spec/helpers/projects/observability_helper_spec.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +require 'spec_helper' +require 'json' + +RSpec.describe Projects::ObservabilityHelper, type: :helper, feature_category: :tracing do + describe '#observability_tracing_view_model' do + let_it_be(:group) { build_stubbed(:group) } + let_it_be(:project) { build_stubbed(:project, group: group) } + + it 'generates the correct JSON' do + expected_json = { + tracingUrl: Gitlab::Observability.tracing_url(project), + provisioningUrl: Gitlab::Observability.provisioning_url(project), + oauthUrl: Gitlab::Observability.oauth_url + }.to_json + + expect(helper.observability_tracing_view_model(project)).to eq(expected_json) + end + end +end |