Commit 9a22887d authored by James Fargher's avatar James Fargher

Merge branch 'issue#325836-fix-empty-line-after-let-it-be-lib-banzai' into 'master'

Fix EmptyLineAfterFinalLetItBe offenses in spec/lib/banzai

See merge request gitlab-org/gitlab!58242
parents ccfd1f5f 8f474b66
...@@ -779,10 +779,6 @@ RSpec/EmptyLineAfterFinalLetItBe: ...@@ -779,10 +779,6 @@ RSpec/EmptyLineAfterFinalLetItBe:
- spec/lib/api/entities/release_spec.rb - spec/lib/api/entities/release_spec.rb
- spec/lib/api/helpers/caching_spec.rb - spec/lib/api/helpers/caching_spec.rb
- spec/lib/api/helpers/packages_manager_clients_helpers_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/bulk_imports/groups/loaders/group_loader_spec.rb
- spec/lib/extracts_path_spec.rb - spec/lib/extracts_path_spec.rb
- spec/lib/extracts_ref_spec.rb - spec/lib/extracts_ref_spec.rb
......
---
title: Fix EmptyLineAfterFinalLetItBe offenses in spec/lib/banzai
merge_request: 58242
author: Huzaifa Iftikhar @huzaifaiftikhar
type: fixed
...@@ -184,6 +184,7 @@ RSpec.describe Banzai::Filter::ExternalIssueReferenceFilter do ...@@ -184,6 +184,7 @@ RSpec.describe Banzai::Filter::ExternalIssueReferenceFilter do
context "jira project" do context "jira project" do
let_it_be(:service) { create(:jira_service, project: project) } let_it_be(:service) { create(:jira_service, project: project) }
let(:reference) { issue.to_reference } let(:reference) { issue.to_reference }
context "with right markdown" do context "with right markdown" do
......
...@@ -6,6 +6,7 @@ RSpec.describe Banzai::Filter::InlineMetricsRedactorFilter do ...@@ -6,6 +6,7 @@ RSpec.describe Banzai::Filter::InlineMetricsRedactorFilter do
include FilterSpecHelper include FilterSpecHelper
let_it_be(:project) { create(:project) } let_it_be(:project) { create(:project) }
let(:url) { urls.metrics_dashboard_project_environment_url(project, 1, embedded: true) } let(:url) { urls.metrics_dashboard_project_environment_url(project, 1, embedded: true) }
let(:input) { %(<a href="#{url}">example</a>) } let(:input) { %(<a href="#{url}">example</a>) }
let(:doc) { filter(input) } let(:doc) { filter(input) }
...@@ -38,6 +39,7 @@ RSpec.describe Banzai::Filter::InlineMetricsRedactorFilter do ...@@ -38,6 +39,7 @@ RSpec.describe Banzai::Filter::InlineMetricsRedactorFilter do
context 'for a cluster metric embed' do context 'for a cluster metric embed' do
let_it_be(:cluster) { create(:cluster, :provided_by_gcp, :project, projects: [project]) } let_it_be(:cluster) { create(:cluster, :provided_by_gcp, :project, projects: [project]) }
let(:params) { [project.namespace.path, project.path, cluster.id] } let(:params) { [project.namespace.path, project.path, cluster.id] }
let(:query_params) { { group: 'Cluster Health', title: 'CPU Usage', y_label: 'CPU (cores)' } } 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) } let(:url) { urls.metrics_dashboard_namespace_project_cluster_url(*params, **query_params, format: :json) }
...@@ -84,6 +86,7 @@ RSpec.describe Banzai::Filter::InlineMetricsRedactorFilter do ...@@ -84,6 +86,7 @@ RSpec.describe Banzai::Filter::InlineMetricsRedactorFilter do
context 'for an alert embed' do context 'for an alert embed' do
let_it_be(:alert) { create(:prometheus_alert, project: project) } let_it_be(:alert) { create(:prometheus_alert, project: project) }
let(:url) do let(:url) do
urls.metrics_dashboard_project_prometheus_alert_url( urls.metrics_dashboard_project_prometheus_alert_url(
project, project,
......
...@@ -35,6 +35,7 @@ RSpec.describe Banzai::Filter::UploadLinkFilter do ...@@ -35,6 +35,7 @@ RSpec.describe Banzai::Filter::UploadLinkFilter do
let_it_be(:project) { create(:project, :public) } let_it_be(:project) { create(:project, :public) }
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
let(:group) { nil } let(:group) { nil }
let(:project_path) { project.full_path } let(:project_path) { project.full_path }
let(:only_path) { true } let(:only_path) { true }
...@@ -114,6 +115,7 @@ RSpec.describe Banzai::Filter::UploadLinkFilter do ...@@ -114,6 +115,7 @@ RSpec.describe Banzai::Filter::UploadLinkFilter do
context 'to a group upload' do context 'to a group upload' do
let(:upload_link) { link('/uploads/e90decf88d8f96fe9e1389afc2e4a91f/test.jpg') } let(:upload_link) { link('/uploads/e90decf88d8f96fe9e1389afc2e4a91f/test.jpg') }
let_it_be(:group) { create(:group) } let_it_be(:group) { create(:group) }
let(:project) { nil } let(:project) { nil }
let(:relative_path) { "/groups/#{group.full_path}/-/uploads/e90decf88d8f96fe9e1389afc2e4a91f/test.jpg" } let(:relative_path) { "/groups/#{group.full_path}/-/uploads/e90decf88d8f96fe9e1389afc2e4a91f/test.jpg" }
......
...@@ -145,6 +145,7 @@ RSpec.describe Banzai::Pipeline::GfmPipeline do ...@@ -145,6 +145,7 @@ RSpec.describe Banzai::Pipeline::GfmPipeline do
describe 'emoji in references' do describe 'emoji in references' do
let_it_be(:project) { create(:project, :public) } let_it_be(:project) { create(:project, :public) }
let(:emoji) { '💯' } let(:emoji) { '💯' }
it 'renders a label reference with emoji inside' do 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