Commit 2c4488d5 authored by Huzaifa Iftikhar's avatar Huzaifa Iftikhar Committed by Kerri Miller

Fix EmptyLineAfterFinalLetItBe Rubocop offenses for helpers

parent 3c50a67b
......@@ -682,20 +682,6 @@ RSpec/EmptyLineAfterFinalLetItBe:
- spec/graphql/resolvers/project_pipeline_resolver_spec.rb
- spec/graphql/resolvers/project_pipelines_resolver_spec.rb
- spec/graphql/resolvers/timelog_resolver_spec.rb
- spec/helpers/blob_helper_spec.rb
- spec/helpers/broadcast_messages_helper_spec.rb
- spec/helpers/ci/runners_helper_spec.rb
- spec/helpers/invite_members_helper_spec.rb
- spec/helpers/jira_connect_helper_spec.rb
- spec/helpers/labels_helper_spec.rb
- spec/helpers/markup_helper_spec.rb
- spec/helpers/notes_helper_spec.rb
- spec/helpers/projects/alert_management_helper_spec.rb
- spec/helpers/projects/issues/service_desk_helper_spec.rb
- spec/helpers/projects/project_members_helper_spec.rb
- spec/helpers/projects/terraform_helper_spec.rb
- spec/helpers/projects_helper_spec.rb
- spec/helpers/search_helper_spec.rb
- spec/lib/bulk_imports/groups/loaders/group_loader_spec.rb
- spec/lib/extracts_path_spec.rb
- spec/lib/extracts_ref_spec.rb
......
---
title: Fix EmptyLineAfterFinalLetItBe Rubocop offenses for helpers
merge_request: 58192
author: Huzaifa Iftikhar @huzaifaiftikhar
type: fixed
......@@ -304,6 +304,7 @@ RSpec.describe BlobHelper do
let_it_be(:namespace) { create(:namespace, name: 'gitlab') }
let_it_be(:project) { create(:project, :repository, namespace: namespace) }
let_it_be(:current_user) { create(:user) }
let(:can_push_code) { true }
let(:blob) { project.repository.blob_at('refs/heads/master', 'README.md') }
......
......@@ -28,6 +28,7 @@ RSpec.describe BroadcastMessagesHelper do
describe 'broadcast_message' do
let_it_be(:user) { create(:user) }
let(:current_broadcast_message) { BroadcastMessage.new(message: 'Current Message') }
before do
......
......@@ -84,6 +84,7 @@ RSpec.describe Ci::RunnersHelper do
describe '#toggle_shared_runners_settings_data' do
let_it_be(:group) { create(:group) }
let(:project_with_runners) { create(:project, namespace: group, shared_runners_enabled: true) }
let(:project_without_runners) { create(:project, namespace: group, shared_runners_enabled: false) }
......
......@@ -5,6 +5,7 @@ require "spec_helper"
RSpec.describe InviteMembersHelper do
let_it_be(:project) { create(:project) }
let_it_be(:developer) { create(:user, developer_projects: [project]) }
let(:owner) { project.owner }
before do
......@@ -253,6 +254,7 @@ RSpec.describe InviteMembersHelper do
context 'with a project' do
let_it_be(:form_model) { project }
let(:link_href) { "href=\"#{project_project_members_path(form_model)}\"" }
it_behaves_like 'dropdown invite members link'
......@@ -260,6 +262,7 @@ RSpec.describe InviteMembersHelper do
context 'with a group' do
let_it_be(:form_model) { create(:group) }
let(:link_href) { "href=\"#{group_group_members_path(form_model)}\"" }
it_behaves_like 'dropdown invite members link'
......
......@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec.describe JiraConnectHelper do
describe '#jira_connect_app_data' do
let_it_be(:subscription) { create(:jira_connect_subscription) }
let(:user) { create(:user) }
subject { helper.jira_connect_app_data([subscription]) }
......
......@@ -36,6 +36,7 @@ RSpec.describe LabelsHelper do
context 'with a group label' do
let_it_be(:group) { create(:group) }
let(:label) { create(:group_label, group: group, title: 'bug') }
context 'when asking for an issue link' do
......
......@@ -13,6 +13,7 @@ RSpec.describe MarkupHelper do
let_it_be(:issue) { create(:issue, project: project) }
let_it_be(:merge_request) { create(:merge_request, source_project: project, target_project: project) }
let_it_be(:snippet) { create(:project_snippet, project: project) }
let(:commit) { project.commit }
before do
......@@ -453,6 +454,7 @@ FooBar
let_it_be(:project_base) { create(:project, :repository) }
let_it_be(:context) { { project: project_base } }
let(:file_name) { 'foo.bar' }
let(:text) { 'Noël' }
......
......@@ -15,6 +15,7 @@ RSpec.describe NotesHelper do
let_it_be(:owner_note) { create(:note, author: owner, project: project) }
let_it_be(:maintainer_note) { create(:note, author: maintainer, project: project) }
let_it_be(:reporter_note) { create(:note, author: reporter, project: project) }
let!(:notes) { [owner_note, maintainer_note, reporter_note] }
before_all do
......@@ -73,6 +74,7 @@ RSpec.describe NotesHelper do
describe '#discussion_path' do
let_it_be(:project) { create(:project, :repository) }
let(:anchor) { discussion.line_code }
context 'for a merge request discusion' do
......
......@@ -7,6 +7,7 @@ RSpec.describe Projects::AlertManagementHelper do
let_it_be(:project, reload: true) { create(:project) }
let_it_be(:current_user) { create(:user) }
let(:project_path) { project.full_path }
let(:project_id) { project.id }
......
......@@ -4,6 +4,7 @@ require 'spec_helper'
RSpec.describe Projects::Issues::ServiceDeskHelper do
let_it_be(:project) { create(:project, :public, service_desk_enabled: true) }
let(:user) { build_stubbed(:user) }
let(:current_user) { user }
......
......@@ -128,6 +128,7 @@ RSpec.describe Projects::ProjectMembersHelper do
describe "when current user is not the owner of the project's parent group" do
let_it_be(:user) { create(:user) }
let(:project2) { create(:project, namespace: group) }
before do
......@@ -174,6 +175,7 @@ RSpec.describe Projects::ProjectMembersHelper do
describe 'project group links' do
let_it_be(:project_group_links) { create_list(:project_group_link, 1, project: project) }
let(:allow_admin_project) { true }
describe '#project_group_links_data_json' do
......
......@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec.describe Projects::TerraformHelper do
describe '#js_terraform_list_data' do
let_it_be(:project) { create(:project) }
let(:current_user) { project.creator }
subject { helper.js_terraform_list_data(current_user, project) }
......
......@@ -85,6 +85,7 @@ RSpec.describe ProjectsHelper do
describe "can_change_visibility_level?" do
let_it_be(:user) { create(:project_member, :reporter, user: create(:user), project: project).user }
let(:forked_project) { fork_project(project, user) }
it "returns false if there are no appropriate permissions" do
......
......@@ -489,6 +489,7 @@ RSpec.describe SearchHelper do
describe '#repository_ref' do
let_it_be(:project) { create(:project, :repository) }
let(:params) { { repository_ref: 'the-repository-ref-param' } }
subject { repository_ref(project) }
......
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