Commit e0b31c94 authored by Huzaifa Iftikhar's avatar Huzaifa Iftikhar

Fix EmptyLineAfterFinalLetItBe offenses in spec/lib/banzai

Contributes to https://gitlab.com/gitlab-org/gitlab/-/issues/325836
parent fffdd5c4
......@@ -1078,10 +1078,6 @@ RSpec/EmptyLineAfterFinalLetItBe:
- spec/lib/api/entities/release_spec.rb
- spec/lib/api/helpers/caching_spec.rb
- spec/lib/api/helpers/packages_manager_clients_helpers_spec.rb
- spec/lib/banzai/filter/external_issue_reference_filter_spec.rb
- spec/lib/banzai/filter/inline_metrics_redactor_filter_spec.rb
- spec/lib/banzai/filter/upload_link_filter_spec.rb
- spec/lib/banzai/pipeline/gfm_pipeline_spec.rb
- spec/lib/bulk_imports/groups/loaders/group_loader_spec.rb
- spec/lib/extracts_path_spec.rb
- spec/lib/extracts_ref_spec.rb
......
......@@ -184,6 +184,7 @@ RSpec.describe Banzai::Filter::ExternalIssueReferenceFilter do
context "jira project" do
let_it_be(:service) { create(:jira_service, project: project) }
let(:reference) { issue.to_reference }
context "with right markdown" do
......
......@@ -6,6 +6,7 @@ RSpec.describe Banzai::Filter::InlineMetricsRedactorFilter do
include FilterSpecHelper
let_it_be(:project) { create(:project) }
let(:url) { urls.metrics_dashboard_project_environment_url(project, 1, embedded: true) }
let(:input) { %(<a href="#{url}">example</a>) }
let(:doc) { filter(input) }
......@@ -38,6 +39,7 @@ RSpec.describe Banzai::Filter::InlineMetricsRedactorFilter do
context 'for a cluster metric embed' do
let_it_be(:cluster) { create(:cluster, :provided_by_gcp, :project, projects: [project]) }
let(:params) { [project.namespace.path, project.path, cluster.id] }
let(:query_params) { { group: 'Cluster Health', title: 'CPU Usage', y_label: 'CPU (cores)' } }
let(:url) { urls.metrics_dashboard_namespace_project_cluster_url(*params, **query_params, format: :json) }
......@@ -84,6 +86,7 @@ RSpec.describe Banzai::Filter::InlineMetricsRedactorFilter do
context 'for an alert embed' do
let_it_be(:alert) { create(:prometheus_alert, project: project) }
let(:url) do
urls.metrics_dashboard_project_prometheus_alert_url(
project,
......
......@@ -35,6 +35,7 @@ RSpec.describe Banzai::Filter::UploadLinkFilter do
let_it_be(:project) { create(:project, :public) }
let_it_be(:user) { create(:user) }
let(:group) { nil }
let(:project_path) { project.full_path }
let(:only_path) { true }
......@@ -114,6 +115,7 @@ RSpec.describe Banzai::Filter::UploadLinkFilter do
context 'to a group upload' do
let(:upload_link) { link('/uploads/e90decf88d8f96fe9e1389afc2e4a91f/test.jpg') }
let_it_be(:group) { create(:group) }
let(:project) { nil }
let(:relative_path) { "/groups/#{group.full_path}/-/uploads/e90decf88d8f96fe9e1389afc2e4a91f/test.jpg" }
......
......@@ -145,6 +145,7 @@ RSpec.describe Banzai::Pipeline::GfmPipeline do
describe 'emoji in references' do
let_it_be(:project) { create(:project, :public) }
let(:emoji) { '💯' }
it 'renders a label reference with emoji inside' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment