Commit ffcf4735 authored by Stan Hu's avatar Stan Hu

Merge branch '220018-rspec-zero-monkey-patching-mode-2' into 'master'

RSpec zero monkey patching mode

See merge request gitlab-org/gitlab!33722
parents 3f472c95 b1823aea
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Security::JobsFinder do
RSpec.describe Security::JobsFinder do
it 'is an abstract class that does not permit instantiation' do
expect { described_class.new(pipeline: nil) }.to raise_error(
NotImplementedError,
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Security::LicenseComplianceJobsFinder do
RSpec.describe Security::LicenseComplianceJobsFinder do
it_behaves_like ::Security::JobsFinder, described_class.allowed_job_types
describe "#execute" do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Security::PipelineVulnerabilitiesFinder do
RSpec.describe Security::PipelineVulnerabilitiesFinder do
def disable_deduplication
allow(::Security::MergeReportsService).to receive(:new) do |*args|
instance_double('NoDeduplicationMergeReportsService', execute: args.last)
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Security::SecurityJobsFinder do
RSpec.describe Security::SecurityJobsFinder do
it_behaves_like ::Security::JobsFinder, described_class.allowed_job_types
describe "#execute" do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Security::VulnerabilitiesFinder do
RSpec.describe Security::VulnerabilitiesFinder do
let_it_be(:project) { create(:project) }
let_it_be(:vulnerability1) do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Security::VulnerabilityFindingsFinder do
RSpec.describe Security::VulnerabilityFindingsFinder do
describe '#execute' do
let_it_be(:project1) { create(:project, :private, :repository) }
let_it_be(:project2) { create(:project, :private, :repository) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Security::VulnerableProjectsFinder do
RSpec.describe Security::VulnerableProjectsFinder do
describe '#execute' do
let(:projects) { Project.all }
let!(:safe_project) { create(:project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe SnippetsFinder do
RSpec.describe SnippetsFinder do
let_it_be(:group) { create(:group, :public) }
let_it_be(:project) { create(:project, :public, group: group) }
let_it_be(:private_project_snippet) { create(:project_snippet, :private, project: project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe SoftwareLicensePoliciesFinder do
RSpec.describe SoftwareLicensePoliciesFinder do
let(:project) { create(:project) }
let(:software_license_policy) { create(:software_license_policy, project: project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe StatusPage::IncidentCommentsFinder do
RSpec.describe StatusPage::IncidentCommentsFinder do
let_it_be(:user) { create(:user) }
let_it_be(:issue) { create(:issue) }
let_it_be(:unrelated_issue) { create(:issue, project: issue.project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe StatusPage::IncidentsFinder do
RSpec.describe StatusPage::IncidentsFinder do
let_it_be(:project) { create(:project) }
let_it_be(:issues) do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe TemplateFinder do
RSpec.describe TemplateFinder do
using RSpec::Parameterized::TableSyntax
let_it_be(:project) { create(:project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe UsersFinder do
RSpec.describe UsersFinder do
describe '#execute' do
include_context 'UsersFinder#execute filter by project context'
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Mutations::ResolvesIssuable do
RSpec.describe Mutations::ResolvesIssuable do
let_it_be(:mutation_class) do
Class.new(Mutations::BaseMutation) do
include Mutations::ResolvesIssuable
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Resolvers::BoardListsResolver do
RSpec.describe Resolvers::BoardListsResolver do
include GraphqlHelpers
let_it_be(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Resolvers::IssuesResolver do
RSpec.describe Resolvers::IssuesResolver do
include GraphqlHelpers
let_it_be(:current_user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Resolvers::NamespaceProjectsResolver do
RSpec.describe Resolvers::NamespaceProjectsResolver do
include GraphqlHelpers
let(:current_user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GitlabSchema.types['BoardList'] do
RSpec.describe GitlabSchema.types['BoardList'] do
it 'has specific fields' do
expected_fields = %w[milestone max_issue_count max_issue_weight assignee]
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GitlabSchema.types['Board'] do
RSpec.describe GitlabSchema.types['Board'] do
it 'includes the ee specific fields' do
expect(described_class).to have_graphql_field('weight')
end
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GitlabSchema.types['Group'] do
RSpec.describe GitlabSchema.types['Group'] do
describe 'nested epic request' do
it { expect(described_class).to have_graphql_field(:epicsEnabled) }
it { expect(described_class).to have_graphql_field(:epics) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GitlabSchema.types['IssueSort'] do
RSpec.describe GitlabSchema.types['IssueSort'] do
it { expect(described_class.graphql_name).to eq('IssueSort') }
it_behaves_like 'common sort values'
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Mutations::Boards::Lists::UpdateLimitMetrics do
RSpec.describe Mutations::Boards::Lists::UpdateLimitMetrics do
let_it_be(:group) { create(:group, :private) }
let_it_be(:board) { create(:board, group: group) }
let_it_be(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Mutations::Epics::AddIssue do
RSpec.describe Mutations::Epics::AddIssue do
let_it_be(:group) { create(:group) }
let_it_be(:project) { create(:project, namespace: group) }
let_it_be(:epic) { create(:epic, group: group) }
......
# frozen_string_literal: true
require 'spec_helper'
describe Mutations::InstanceSecurityDashboard::AddProject do
RSpec.describe Mutations::InstanceSecurityDashboard::AddProject do
let(:mutation) { described_class.new(object: nil, context: { current_user: current_user }, field: nil) }
describe '#resolve' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Mutations::InstanceSecurityDashboard::RemoveProject do
RSpec.describe Mutations::InstanceSecurityDashboard::RemoveProject do
let(:mutation) { described_class.new(object: nil, context: { current_user: current_user }, field: nil) }
describe '#resolve' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Mutations::Issues::SetIteration do
RSpec.describe Mutations::Issues::SetIteration do
let(:issue) { create(:issue) }
let(:user) { create(:user) }
......
# frozen_string_literal: true
require 'spec_helper'
describe Mutations::Issues::SetWeight do
RSpec.describe Mutations::Issues::SetWeight do
let(:issue) { create(:issue) }
let(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Mutations::Issues::Update do
RSpec.describe Mutations::Issues::Update do
it_behaves_like 'updating health status' do
let(:resource) { create(:issue) }
let(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Mutations::MergeRequests::SetAssignees do
RSpec.describe Mutations::MergeRequests::SetAssignees do
let(:merge_request) { create(:merge_request) }
let(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Mutations::RequirementsManagement::CreateRequirement do
RSpec.describe Mutations::RequirementsManagement::CreateRequirement do
let_it_be(:project) { create(:project) }
let_it_be(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Mutations::RequirementsManagement::UpdateRequirement do
RSpec.describe Mutations::RequirementsManagement::UpdateRequirement do
let_it_be(:project) { create(:project) }
let_it_be(:user) { create(:user) }
let_it_be(:requirement) { create(:requirement, project: project) }
......
# frozen_string_literal: true
require 'spec_helper'
describe Mutations::Vulnerabilities::Dismiss do
RSpec.describe Mutations::Vulnerabilities::Dismiss do
let(:mutation) { described_class.new(object: nil, context: { current_user: user }, field: nil) }
describe '#resolve' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Resolvers::EpicIssuesResolver do
RSpec.describe Resolvers::EpicIssuesResolver do
include GraphqlHelpers
let_it_be(:current_user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Resolvers::EpicsResolver do
RSpec.describe Resolvers::EpicsResolver do
include GraphqlHelpers
let_it_be(:current_user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Resolvers::Geo::GeoNodeResolver do
RSpec.describe Resolvers::Geo::GeoNodeResolver do
include GraphqlHelpers
include EE::GeoHelpers
......
......@@ -2,6 +2,6 @@
require 'spec_helper'
describe Resolvers::Geo::PackageFileRegistriesResolver do
RSpec.describe Resolvers::Geo::PackageFileRegistriesResolver do
it_behaves_like 'a Geo registries resolver', :package_file_registry
end
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Resolvers::InstanceSecurityDashboard::ProjectsResolver do
RSpec.describe Resolvers::InstanceSecurityDashboard::ProjectsResolver do
include GraphqlHelpers
describe '#resolve' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Resolvers::InstanceSecurityDashboardResolver do
RSpec.describe Resolvers::InstanceSecurityDashboardResolver do
include GraphqlHelpers
describe '#resolve' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Resolvers::IterationsResolver do
RSpec.describe Resolvers::IterationsResolver do
include GraphqlHelpers
describe '#resolve' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Resolvers::PackagesResolver do
RSpec.describe Resolvers::PackagesResolver do
include GraphqlHelpers
let_it_be(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Resolvers::RequirementsManagement::RequirementsResolver do
RSpec.describe Resolvers::RequirementsManagement::RequirementsResolver do
include GraphqlHelpers
let_it_be(:current_user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Resolvers::RequirementsManagement::TestReportsResolver do
RSpec.describe Resolvers::RequirementsManagement::TestReportsResolver do
include GraphqlHelpers
let_it_be(:current_user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Resolvers::TimelogResolver do
RSpec.describe Resolvers::TimelogResolver do
include GraphqlHelpers
context "within a group" do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Resolvers::VulnerabilitiesHistoryResolver do
RSpec.describe Resolvers::VulnerabilitiesHistoryResolver do
include GraphqlHelpers
subject { resolve(described_class, obj: group, args: args, ctx: { current_user: user }) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Resolvers::VulnerabilitiesResolver do
RSpec.describe Resolvers::VulnerabilitiesResolver do
include GraphqlHelpers
describe '#resolve' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GitlabSchema.types['EpicDescendantCount'] do
RSpec.describe GitlabSchema.types['EpicDescendantCount'] do
it { expect(described_class.graphql_name).to eq('EpicDescendantCount') }
it 'has specific fields' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GitlabSchema.types['EpicDescendantWeights'] do
RSpec.describe GitlabSchema.types['EpicDescendantWeights'] do
it { expect(described_class.graphql_name).to eq('EpicDescendantWeights') }
it 'has specific fields' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GitlabSchema.types['EpicIssue'] do
RSpec.describe GitlabSchema.types['EpicIssue'] do
it { expect(described_class.graphql_name).to eq('EpicIssue') }
it { expect(described_class).to require_graphql_authorizations(:read_issue) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GitlabSchema.types['EpicSort'] do
RSpec.describe GitlabSchema.types['EpicSort'] do
it { expect(described_class.graphql_name).to eq('EpicSort') }
it 'exposes all the existing epic sort orders' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GitlabSchema.types['EpicState'] do
RSpec.describe GitlabSchema.types['EpicState'] do
it { expect(described_class.graphql_name).to eq('EpicState') }
it 'exposes all the existing epic states' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GitlabSchema.types['Epic'] do
RSpec.describe GitlabSchema.types['Epic'] do
let(:fields) do
%i[
id iid title description confidential state group parent author labels
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GitlabSchema.types['GeoNode'] do
RSpec.describe GitlabSchema.types['GeoNode'] do
it { expect(described_class).to require_graphql_authorizations(:read_geo_node) }
it 'has the expected fields' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GitlabSchema.types['PackageFileRegistry'] do
RSpec.describe GitlabSchema.types['PackageFileRegistry'] do
it_behaves_like 'a Geo registry type'
it 'has the expected fields (other than those included in RegistryType)' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GitlabSchema.types['RegistryState'] do
RSpec.describe GitlabSchema.types['RegistryState'] do
it { expect(described_class.graphql_name).to eq('RegistryState') }
it 'exposes the correct registry states' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GitlabSchema.types['HealthStatus'] do
RSpec.describe GitlabSchema.types['HealthStatus'] do
it { expect(described_class.graphql_name).to eq('HealthStatus') }
it 'exposes all the existing epic sort orders' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GitlabSchema.types['InstanceSecurityDashboard'] do
RSpec.describe GitlabSchema.types['InstanceSecurityDashboard'] do
let_it_be(:project) { create(:project) }
let_it_be(:other_project) { create(:project) }
let_it_be(:user) { create(:user, security_dashboard_projects: [project]) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GitlabSchema.types['Issue'] do
RSpec.describe GitlabSchema.types['Issue'] do
it { expect(described_class).to have_graphql_field(:epic) }
it { expect(described_class).to have_graphql_field(:iteration) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GitlabSchema.types['Iteration'] do
RSpec.describe GitlabSchema.types['Iteration'] do
it { expect(described_class.graphql_name).to eq('Iteration') }
it { expect(described_class).to require_graphql_authorizations(:read_iteration) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GitlabSchema.types['MoveType'] do
RSpec.describe GitlabSchema.types['MoveType'] do
it { expect(described_class.graphql_name).to eq('MoveType') }
it 'exposes all the existing move values' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GitlabSchema.types['PackageTypeEnum'] do
RSpec.describe GitlabSchema.types['PackageTypeEnum'] do
it 'exposes all package types' do
expect(described_class.values.keys).to contain_exactly(*%w[MAVEN NPM CONAN NUGET PYPI COMPOSER])
end
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GitlabSchema.types['Package'] do
RSpec.describe GitlabSchema.types['Package'] do
it { expect(described_class.graphql_name).to eq('Package') }
it 'includes all the package fields' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Types::PermissionTypes::Epic do
RSpec.describe Types::PermissionTypes::Epic do
specify do
expected_permissions = [:read_epic, :read_epic_iid, :update_epic, :destroy_epic,
:admin_epic, :create_epic, :create_note, :award_emoji]
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Types::PermissionTypes::Vulnerability do
RSpec.describe Types::PermissionTypes::Vulnerability do
it do
expected_permissions = %i[read_vulnerability_feedback create_vulnerability_feedback destroy_vulnerability_feedback
update_vulnerability_feedback create_vulnerability create_vulnerability_export
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GitlabSchema.types['Project'] do
RSpec.describe GitlabSchema.types['Project'] do
let_it_be(:project) { create(:project) }
let_it_be(:user) { create(:user) }
let_it_be(:vulnerability) { create(:vulnerability, project: project, severity: :high) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GitlabSchema.types['Query'] do
RSpec.describe GitlabSchema.types['Query'] do
specify do
expect(described_class).to have_graphql_fields(
:geo_node,
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GitlabSchema.types['RequirementState'] do
RSpec.describe GitlabSchema.types['RequirementState'] do
it { expect(described_class.graphql_name).to eq('RequirementState') }
it 'exposes all the existing requirement states' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GitlabSchema.types['RequirementStatesCount'] do
RSpec.describe GitlabSchema.types['RequirementStatesCount'] do
it { expect(described_class.graphql_name).to eq('RequirementStatesCount') }
it 'has specific fields' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GitlabSchema.types['Requirement'] do
RSpec.describe GitlabSchema.types['Requirement'] do
fields = %i[id iid title state project author created_at updated_at user_permissions test_reports]
it { expect(described_class).to expose_permissions_using(Types::PermissionTypes::Requirement) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GitlabSchema.types['TestReport'] do
RSpec.describe GitlabSchema.types['TestReport'] do
fields = %i[id state pipeline author created_at]
it { expect(described_class.graphql_name).to eq('TestReport') }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GitlabSchema.types['Timelog'] do
RSpec.describe GitlabSchema.types['Timelog'] do
let(:fields) { %i[date spent_at time_spent user issue] }
it { expect(described_class.graphql_name).to eq('Timelog') }
......
......@@ -2,6 +2,6 @@
require 'spec_helper'
describe GitlabSchema.types['VulnerabilitiesCountByDayAndSeverity'] do
RSpec.describe GitlabSchema.types['VulnerabilitiesCountByDayAndSeverity'] do
it { expect(described_class).to have_graphql_fields(:count, :day, :severity) }
end
......@@ -2,6 +2,6 @@
require 'spec_helper'
describe GitlabSchema.types['VulnerabilityLocationContainerScanning'] do
RSpec.describe GitlabSchema.types['VulnerabilityLocationContainerScanning'] do
it { expect(described_class).to have_graphql_fields(:dependency, :image, :operating_system) }
end
......@@ -2,6 +2,6 @@
require 'spec_helper'
describe GitlabSchema.types['VulnerabilityLocationDast'] do
RSpec.describe GitlabSchema.types['VulnerabilityLocationDast'] do
it { expect(described_class).to have_graphql_fields(:hostname, :param, :path, :request_method) }
end
......@@ -2,6 +2,6 @@
require 'spec_helper'
describe GitlabSchema.types['VulnerabilityLocationDependencyScanning'] do
RSpec.describe GitlabSchema.types['VulnerabilityLocationDependencyScanning'] do
it { expect(described_class).to have_graphql_fields(:dependency, :file) }
end
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GitlabSchema.types['VulnerabilityLocationSast'] do
RSpec.describe GitlabSchema.types['VulnerabilityLocationSast'] do
it do
expect(described_class).to have_graphql_fields(
:end_line,
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GitlabSchema.types['VulnerabilityReportType'] do
RSpec.describe GitlabSchema.types['VulnerabilityReportType'] do
it 'exposes all vulnerability report types' do
expect(described_class.values.keys).to contain_exactly(*%w[SAST SECRET_DETECTION DAST CONTAINER_SCANNING DEPENDENCY_SCANNING])
end
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GitlabSchema.types['VulnerabilitySeveritiesCount'] do
RSpec.describe GitlabSchema.types['VulnerabilitySeveritiesCount'] do
let_it_be(:fields) do
::Vulnerabilities::Occurrence::SEVERITY_LEVELS.keys
end
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GitlabSchema.types['VulnerabilitySeverity'] do
RSpec.describe GitlabSchema.types['VulnerabilitySeverity'] do
it 'exposes all vulnerability severities' do
expect(described_class.values.keys).to contain_exactly(*%w[CRITICAL HIGH MEDIUM LOW UNKNOWN INFO])
end
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GitlabSchema.types['VulnerabilityState'] do
RSpec.describe GitlabSchema.types['VulnerabilityState'] do
it 'exposes all vulnerability states' do
expect(described_class.values.keys).to contain_exactly(*%w[DETECTED CONFIRMED DISMISSED RESOLVED])
end
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GitlabSchema.types['Vulnerability'] do
RSpec.describe GitlabSchema.types['Vulnerability'] do
let_it_be(:project) { create(:project) }
let_it_be(:user) { create(:user) }
let_it_be(:vulnerability) { create(:vulnerability, project: project) }
......
......@@ -2,6 +2,6 @@
require 'spec_helper'
describe GitlabSchema.types['VulnerableDependency'] do
RSpec.describe GitlabSchema.types['VulnerableDependency'] do
it { expect(described_class).to have_graphql_fields(:package, :version) }
end
......@@ -2,6 +2,6 @@
require 'spec_helper'
describe GitlabSchema.types['VulnerablePackage'] do
RSpec.describe GitlabSchema.types['VulnerablePackage'] do
it { expect(described_class).to have_graphql_fields(:name) }
end
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Admin::EmailsHelper, :clean_gitlab_redis_shared_state do
RSpec.describe Admin::EmailsHelper, :clean_gitlab_redis_shared_state do
include ExclusiveLeaseHelpers
let(:lease_key) { Admin::EmailService::LEASE_KEY }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ApplicationHelper do
RSpec.describe ApplicationHelper do
include EE::GeoHelpers
describe '#read_only_message', :geo do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe AuditEventsHelper do
RSpec.describe AuditEventsHelper do
describe '#human_text' do
let(:target_type) { 'User' }
let(:details) do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe AuditLogsHelper do
RSpec.describe AuditLogsHelper do
using RSpec::Parameterized::TableSyntax
describe '#admin_audit_log_token_types' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe BillingPlansHelper do
RSpec.describe BillingPlansHelper do
describe '#current_plan?' do
it 'returns true when current_plan' do
plan = Hashie::Mash.new(purchase_link: { action: 'current_plan' })
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe BoardsHelper do
RSpec.describe BoardsHelper do
let(:project) { create(:project) }
describe '#board_list_data' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ComplianceManagement::ComplianceFramework::ProjectSettingsHelper do
RSpec.describe ComplianceManagement::ComplianceFramework::ProjectSettingsHelper do
describe '#compliance_framework_options' do
it 'has all the options' do
expect(helper.compliance_framework_options).to contain_exactly(
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe CredentialsInventoryHelper do
RSpec.describe CredentialsInventoryHelper do
let(:filter) { nil }
before do
......
......@@ -2,7 +2,7 @@
#
require 'spec_helper'
describe EE::AuthHelper do
RSpec.describe EE::AuthHelper do
describe "button_based_providers" do
it 'excludes group_saml' do
allow(helper).to receive(:auth_providers) { [:group_saml] }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe BlobHelper do
RSpec.describe BlobHelper do
include TreeHelper
describe '#licenses_for_select' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ClustersHelper do
RSpec.describe ClustersHelper do
shared_examples 'feature availablilty' do |feature|
before do
# clusterable is provided as a `helper_method`
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe DashboardHelper, type: :helper do
RSpec.describe DashboardHelper, type: :helper do
let(:user) { build(:user) }
describe '#dashboard_nav_links' do
......
......@@ -2,7 +2,7 @@
require "spec_helper"
describe EE::EmailsHelper do
RSpec.describe EE::EmailsHelper do
describe '#action_title' do
using RSpec::Parameterized::TableSyntax
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe EnvironmentsHelper do
RSpec.describe EnvironmentsHelper do
let(:environment) { create(:environment) }
let(:project) { environment.project }
let(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe EventsHelper do
RSpec.describe EventsHelper do
describe '#event_note_target_url' do
subject { helper.event_note_target_url(event) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe EE::FlipperSessionHelper do
RSpec.describe EE::FlipperSessionHelper do
describe '.flipper_session' do
let(:session) { {} }
......
# frozen_string_literal: true
require 'spec_helper'
describe EE::GeoHelper do
RSpec.describe EE::GeoHelper do
describe '.current_node_human_status' do
where(:primary, :secondary, :result) do
[
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe EE::GitlabRoutingHelper do
RSpec.describe EE::GitlabRoutingHelper do
include ProjectsHelper
include ApplicationSettingsHelper
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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