Commit 5de40069 authored by Markus Koller's avatar Markus Koller

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

RSpec zero monkey patching mode

See merge request gitlab-org/gitlab!33728
parents a62203ed 668a5aca
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe PushRule do
RSpec.describe PushRule do
using RSpec::Parameterized::TableSyntax
let(:global_push_rule) { create(:push_rule_sample) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe RemoteMirror do
RSpec.describe RemoteMirror do
let(:project) { create(:project, :repository, :remote_mirror) }
describe '#sync' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Repository do
RSpec.describe Repository do
include RepoHelpers
include ::EE::GeoHelpers
include GitHelpers
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe RequirementsManagement::Requirement do
RSpec.describe RequirementsManagement::Requirement do
let_it_be(:user) { create(:user) }
let_it_be(:project) { create(:project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe RequirementsManagement::TestReport do
RSpec.describe RequirementsManagement::TestReport do
describe 'associations' do
subject { build(:test_report) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe SamlProvider do
RSpec.describe SamlProvider do
let(:group) { create(:group) }
subject(:saml_provider) { create(:saml_provider, group: group) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ScimIdentity do
RSpec.describe ScimIdentity do
describe 'relations' do
it { is_expected.to belong_to(:group) }
it { is_expected.to belong_to(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ScimOauthAccessToken do
RSpec.describe ScimOauthAccessToken do
describe "Associations" do
it { is_expected.to belong_to :group }
end
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ScopedLabelSet do
RSpec.describe ScopedLabelSet do
let_it_be(:kv_label1) { create(:label, title: 'key::label1') }
let_it_be(:kv_label2) { create(:label, title: 'key::label2') }
let_it_be(:kv_label3) { create(:label, title: 'key::label3') }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Security::Scan do
RSpec.describe Security::Scan do
describe 'associations' do
it { is_expected.to belong_to(:build) }
it { is_expected.to have_one(:pipeline).through(:build).class_name('Ci::Pipeline') }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ServiceDeskSetting do
RSpec.describe ServiceDeskSetting do
describe 'validations' do
subject(:service_desk_setting) { create(:service_desk_setting) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Service do
RSpec.describe Service do
describe 'Available services' do
let(:ee_services) do
%w(
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe SlackIntegration do
RSpec.describe SlackIntegration do
describe "Associations" do
it { is_expected.to belong_to(:service) }
end
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe SoftwareLicensePolicy do
RSpec.describe SoftwareLicensePolicy do
subject { build(:software_license_policy) }
describe 'validations' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe SoftwareLicense do
RSpec.describe SoftwareLicense do
subject { build(:software_license) }
describe 'validations' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe StatusPage::ProjectSetting do
RSpec.describe StatusPage::ProjectSetting do
describe 'associations' do
it { is_expected.to belong_to(:project) }
end
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe StatusPage::PublishedIncident do
RSpec.describe StatusPage::PublishedIncident do
describe 'associations' do
it { is_expected.to belong_to(:issue).inverse_of(:status_page_published_incident) }
end
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe StorageShard do
RSpec.describe StorageShard do
describe '.all' do
it 'returns an array of StorageShard objects' do
shards = described_class.all
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Upload do
RSpec.describe Upload do
include EE::GeoHelpers
describe '#destroy' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe UserPreference do
RSpec.describe UserPreference do
let(:user_preference) { create(:user_preference) }
shared_examples 'updates roadmap_epics_state' do |state|
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe User do
RSpec.describe User do
subject(:user) { described_class.new }
describe 'user creation' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe UsersSecurityDashboardProject do
RSpec.describe UsersSecurityDashboardProject do
subject { build(:users_security_dashboard_project) }
describe 'associations' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe VisibleApprovable do
RSpec.describe VisibleApprovable do
let(:resource) { create(:merge_request, source_project: project) }
let!(:project) { create(:project, :repository) }
let!(:user) { project.creator }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Vulnerabilities::Export do
RSpec.describe Vulnerabilities::Export do
it { is_expected.to define_enum_for(:format) }
describe 'associations' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Vulnerabilities::Feedback do
RSpec.describe Vulnerabilities::Feedback do
it {
is_expected.to(
define_enum_for(:feedback_type)
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Vulnerabilities::Identifier do
RSpec.describe Vulnerabilities::Identifier do
describe 'associations' do
it { is_expected.to have_many(:occurrence_identifiers).class_name('Vulnerabilities::OccurrenceIdentifier') }
it { is_expected.to have_many(:occurrences).class_name('Vulnerabilities::Occurrence') }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Vulnerabilities::IssueLink do
RSpec.describe Vulnerabilities::IssueLink do
describe 'associations and fields' do
it { is_expected.to belong_to(:vulnerability) }
it { is_expected.to belong_to(:issue) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Vulnerabilities::OccurrenceIdentifier do
RSpec.describe Vulnerabilities::OccurrenceIdentifier do
describe 'associations' do
it { is_expected.to belong_to(:identifier).class_name('Vulnerabilities::Identifier') }
it { is_expected.to belong_to(:occurrence).class_name('Vulnerabilities::Occurrence') }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Vulnerabilities::OccurrencePipeline do
RSpec.describe Vulnerabilities::OccurrencePipeline do
describe 'associations' do
it { is_expected.to belong_to(:pipeline).class_name('Ci::Pipeline') }
it { is_expected.to belong_to(:occurrence).class_name('Vulnerabilities::Occurrence') }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Vulnerabilities::Occurrence do
RSpec.describe Vulnerabilities::Occurrence do
it { is_expected.to define_enum_for(:confidence) }
it { is_expected.to define_enum_for(:report_type) }
it { is_expected.to define_enum_for(:severity) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Vulnerabilities::Scanner do
RSpec.describe Vulnerabilities::Scanner do
describe 'associations' do
it { is_expected.to have_many(:occurrences).class_name('Vulnerabilities::Occurrence') }
it { is_expected.to belong_to(:project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Vulnerability do
RSpec.describe Vulnerability do
let(:state_values) { { detected: 1, dismissed: 2, resolved: 3, confirmed: 4 } }
let(:severity_values) { { info: 1, unknown: 2, low: 4, medium: 5, high: 6, critical: 7 } }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe VulnerabilityUserMention do
RSpec.describe VulnerabilityUserMention do
describe 'associations' do
it { is_expected.to belong_to(:vulnerability) }
it { is_expected.to belong_to(:note) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ApprovalMergeRequestRulePolicy do
RSpec.describe ApprovalMergeRequestRulePolicy do
let(:merge_request) { create(:merge_request) }
let(:approval_rule) { create(:approval_merge_request_rule, merge_request: merge_request) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ApprovalProjectRulePolicy do
RSpec.describe ApprovalProjectRulePolicy do
let(:project) { create(:project) }
let!(:approval_rule) { create(:approval_project_rule, project: project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe AwardEmojiPolicy do
RSpec.describe AwardEmojiPolicy do
let(:user) { create(:user) }
let(:award_emoji) { create(:award_emoji, awardable: create(:epic, group: group)) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe BasePolicy do
RSpec.describe BasePolicy do
include ExternalAuthorizationServiceHelpers
let(:auditor) { build(:auditor) }
......
# frozen_string_literal: true
require 'spec_helper'
describe Ci::BuildPolicy do
RSpec.describe Ci::BuildPolicy do
using RSpec::Parameterized::TableSyntax
let(:project) { create(:project, :repository) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Clusters::InstancePolicy, :enable_admin_mode do
RSpec.describe Clusters::InstancePolicy, :enable_admin_mode do
let(:user) { build(:admin) }
let(:instance) { Clusters::Instance.new }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ContainerExpirationPolicyPolicy do
RSpec.describe ContainerExpirationPolicyPolicy do
using RSpec::Parameterized::TableSyntax
let_it_be(:user) { create(:user) }
......
# frozen_string_literal: true
require 'spec_helper'
describe EnvironmentPolicy do
RSpec.describe EnvironmentPolicy do
using RSpec::Parameterized::TableSyntax
let(:project) { create(:project, :repository) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe EpicPolicy do
RSpec.describe EpicPolicy do
include ExternalAuthorizationServiceHelpers
let(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Geo::RegistryPolicy do
RSpec.describe Geo::RegistryPolicy do
let!(:registry) { create(:package_file_registry) }
subject(:policy) { described_class.new(current_user, registry) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GeoNodePolicy do
RSpec.describe GeoNodePolicy do
let_it_be(:geo_node) { create(:geo_node) }
subject(:policy) { described_class.new(current_user, geo_node) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GlobalPolicy do
RSpec.describe GlobalPolicy do
include ExternalAuthorizationServiceHelpers
let_it_be(:admin) { create(:admin) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GroupPolicy do
RSpec.describe GroupPolicy do
include_context 'GroupPolicy context'
context 'when epics feature is disabled' do
......
# frozen_string_literal: true
require 'spec_helper'
describe IdentityProviderPolicy do
RSpec.describe IdentityProviderPolicy do
subject(:policy) { described_class.new(user, :a_provider) }
describe '#rules' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe InstanceSecurityDashboardPolicy do
RSpec.describe InstanceSecurityDashboardPolicy do
let(:current_user) { create(:user) }
let(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe MergeRequestPolicy do
RSpec.describe MergeRequestPolicy do
include ProjectForksHelper
let_it_be(:guest) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe NamespacePolicy do
RSpec.describe NamespacePolicy do
let(:owner) { build_stubbed(:user) }
let(:namespace) { build_stubbed(:namespace, owner: owner) }
let(:owner_permissions) { [:create_projects, :admin_namespace, :read_namespace] }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe NotePolicy do
RSpec.describe NotePolicy do
describe '#rules' do
let(:reporter) { create(:user) }
let(:developer) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Packages::PackagePolicy do
RSpec.describe Packages::PackagePolicy do
let_it_be(:user) { create(:user) }
let_it_be(:project) { create(:project) }
let_it_be(:package) { create(:package, project: project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ProjectPolicy do
RSpec.describe ProjectPolicy do
include ExternalAuthorizationServiceHelpers
include AdminModeHelper
......
......@@ -3,7 +3,7 @@
require 'spec_helper'
# Snippet visibility scenarios are included in more details in spec/support/snippet_visibility.rb
describe ProjectSnippetPolicy do
RSpec.describe ProjectSnippetPolicy do
let(:project) { create(:project, :public) }
let(:snippet) { create(:project_snippet, snippet_visibility, project: project) }
let(:author_permissions) do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ProtectedBranchPolicy do
RSpec.describe ProtectedBranchPolicy do
let(:user) { create(:user) }
let(:name) { 'feature' }
let(:protected_branch) { create(:protected_branch, name: name) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe RequirementsManagement::RequirementPolicy do
RSpec.describe RequirementsManagement::RequirementPolicy do
let_it_be(:owner) { create(:user) }
let_it_be(:admin) { create(:admin) }
let_it_be(:reporter) { create(:user) }
......
# frozen_string_literal: true
require 'spec_helper'
describe SamlProviderPolicy do
RSpec.describe SamlProviderPolicy do
let(:group_visibility) { :public }
let(:group) { create(:group, group_visibility) }
let(:saml_provider) { create(:saml_provider, group: group) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe UserPolicy do
RSpec.describe UserPolicy do
let(:current_user) { create(:user) }
let(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Vulnerabilities::ExportPolicy do
RSpec.describe Vulnerabilities::ExportPolicy do
let!(:user) { create(:user) }
let!(:project) { create(:project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Vulnerabilities::FeedbackPolicy do
RSpec.describe Vulnerabilities::FeedbackPolicy do
include ExternalAuthorizationServiceHelpers
let(:current_user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Vulnerabilities::IssueLinkPolicy do
RSpec.describe Vulnerabilities::IssueLinkPolicy do
let_it_be(:user) { create(:user) }
let_it_be(:project) { create(:project, namespace: user.namespace) }
let(:vulnerability) { create(:vulnerability, project: project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe VulnerabilityPolicy do
RSpec.describe VulnerabilityPolicy do
describe 'read_vulnerability' do
let(:project) { create(:project) }
let(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Analytics::CycleAnalytics::StagePresenter do
RSpec.describe Analytics::CycleAnalytics::StagePresenter do
let(:default_stage_params) { Gitlab::Analytics::CycleAnalytics::DefaultStages.params_for_issue_stage }
let(:default_stage) { Analytics::CycleAnalytics::ProjectStage.new(default_stage_params) }
let(:custom_stage) { Analytics::CycleAnalytics::ProjectStage.new(name: 'Hello') }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ApprovalRulePresenter do
RSpec.describe ApprovalRulePresenter do
let_it_be(:user) { create(:user) }
let_it_be(:public_group) { create(:group) }
let_it_be(:private_group) { create(:group, :private) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe AuditEventPresenter do
RSpec.describe AuditEventPresenter do
include Gitlab::Routing.url_helpers
let(:details) do
......
# frozen_string_literal: true
require 'spec_helper'
describe Ci::BuildPresenter do
RSpec.describe Ci::BuildPresenter do
subject(:presenter) { described_class.new(build) }
describe '#callout_failure_message' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Ci::PipelinePresenter do
RSpec.describe Ci::PipelinePresenter do
let_it_be(:project, reload: true) { create(:project) }
let_it_be(:pipeline, reload: true) { create(:ee_ci_pipeline, project: project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Clusters::ClusterPresenter do
RSpec.describe Clusters::ClusterPresenter do
include Gitlab::Routing.url_helpers
describe '#health_data' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe InstanceClusterablePresenter do
RSpec.describe InstanceClusterablePresenter do
include Gitlab::Routing.url_helpers
let(:presenter) { described_class.new(instance) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe EpicIssuePresenter do
RSpec.describe EpicIssuePresenter do
include Gitlab::Routing.url_helpers
let(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe EpicPresenter do
RSpec.describe EpicPresenter do
include UsersHelper
include Gitlab::Routing.url_helpers
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GroupClusterablePresenter do
RSpec.describe GroupClusterablePresenter do
include Gitlab::Routing.url_helpers
let_it_be(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GroupMemberPresenter do
RSpec.describe GroupMemberPresenter do
let(:user) { double(:user) }
let(:group) { double(:group) }
let(:group_member) { double(:group_member, source: group, user: user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe LabelPresenter do
RSpec.describe LabelPresenter do
let(:project) { create(:project) }
describe '#scoped_label?' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe MergeRequestApproverPresenter do
RSpec.describe MergeRequestApproverPresenter do
let(:project) { create(:project, :repository) }
let(:merge_request) { create(:merge_request, target_project: project, source_project: project) }
let(:file_paths) { %w{readme.md} }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe MergeRequestPresenter do
RSpec.describe MergeRequestPresenter do
using RSpec::Parameterized::TableSyntax
let(:merge_request) { create(:merge_request, source_project: project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ::Packages::Conan::PackagePresenter do
RSpec.describe ::Packages::Conan::PackagePresenter do
let_it_be(:user) { create(:user) }
let_it_be(:project) { create(:project) }
let_it_be(:conan_package_reference) { '123456789'}
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ::Packages::Detail::PackagePresenter do
RSpec.describe ::Packages::Detail::PackagePresenter do
let_it_be(:user) { create(:user) }
let_it_be(:project) { create(:project, creator: user) }
let_it_be(:package) { create(:npm_package, :with_build, project: project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ::Packages::Npm::PackagePresenter do
RSpec.describe ::Packages::Npm::PackagePresenter do
let_it_be(:project) { create(:project) }
let_it_be(:package_name) { "@#{project.root_namespace.path}/test" }
let!(:package1) { create(:npm_package, version: '1.0.4', project: project, name: package_name) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Packages::Nuget::PackageMetadataPresenter do
RSpec.describe Packages::Nuget::PackageMetadataPresenter do
let_it_be(:package) { create(:nuget_package, :with_metadatum) }
let_it_be(:tag1) { create(:packages_tag, name: 'tag1', package: package) }
let_it_be(:tag2) { create(:packages_tag, name: 'tag2', package: package) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Packages::Nuget::PackagesMetadataPresenter do
RSpec.describe Packages::Nuget::PackagesMetadataPresenter do
let_it_be(:packages) { create_list(:nuget_package, 5, :with_metadatum, name: 'Dummy.Package') }
let_it_be(:presenter) { described_class.new(packages) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Packages::Nuget::PackagesVersionsPresenter do
RSpec.describe Packages::Nuget::PackagesVersionsPresenter do
let_it_be(:packages) { create_list(:nuget_package, 5) }
let_it_be(:presenter) { described_class.new(::Packages::Package.all) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Packages::Nuget::SearchResultsPresenter do
RSpec.describe Packages::Nuget::SearchResultsPresenter do
let_it_be(:project) { create(:project) }
let_it_be(:package_a) { create(:nuget_package, :with_metadatum, project: project, name: 'DummyPackageA') }
let_it_be(:tag1) { create(:packages_tag, package: package_a, name: 'tag1') }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ::Packages::Nuget::ServiceIndexPresenter do
RSpec.describe ::Packages::Nuget::ServiceIndexPresenter do
let_it_be(:project) { create(:project) }
let_it_be(:presenter) { described_class.new(project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ::Packages::Pypi::PackagePresenter do
RSpec.describe ::Packages::Pypi::PackagePresenter do
using RSpec::Parameterized::TableSyntax
let_it_be(:project) { create(:project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ProjectClusterablePresenter do
RSpec.describe ProjectClusterablePresenter do
include Gitlab::Routing.url_helpers
let(:presenter) { described_class.new(project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ProjectMemberPresenter do
RSpec.describe ProjectMemberPresenter do
let(:user) { double(:user) }
let(:project) { double(:project) }
let(:project_member) { double(:project_member, source: project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ProjectPresenter do
RSpec.describe ProjectPresenter do
include Gitlab::Routing.url_helpers
let(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Projects::Security::ConfigurationPresenter do
RSpec.describe Projects::Security::ConfigurationPresenter do
include Gitlab::Routing.url_helpers
let(:project) { create(:project, :repository) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Security::VulnerableProjectPresenter do
RSpec.describe Security::VulnerableProjectPresenter do
let(:project) { create(:project) }
before do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe SubscriptionPresenter do
RSpec.describe SubscriptionPresenter do
let(:subscription) { create(:gitlab_subscription) }
let(:presenter) { described_class.new(subscription, {}) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Vulnerabilities::OccurrencePresenter do
RSpec.describe Vulnerabilities::OccurrencePresenter do
let(:presenter) { described_class.new(occurrence) }
let(:occurrence) { build_stubbed(:vulnerabilities_occurrence) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Geo::PackageFileReplicator do
RSpec.describe Geo::PackageFileReplicator do
let(:model_record) { build(:package_file, :npm) }
it_behaves_like 'a blob replicator'
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'view audit events' do
RSpec.describe 'view audit events' do
describe 'GET /audit_events' do
let_it_be(:admin) { create(:admin) }
let_it_be(:audit_event) { create(:user_audit_event) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe API::Analytics::CodeReviewAnalytics do
RSpec.describe API::Analytics::CodeReviewAnalytics do
let_it_be(:group) { create(:group, :private) }
let_it_be(:project) { create(:project, namespace: group) }
let(:current_user) { reporter }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe API::Analytics::GroupActivityAnalytics do
RSpec.describe API::Analytics::GroupActivityAnalytics do
let_it_be(:group) { create(:group, :private) }
let_it_be(:reporter) do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe API::AuditEvents do
RSpec.describe API::AuditEvents do
describe 'GET /audit_events' do
let(:url) { "/audit_events" }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe API::Boards do
RSpec.describe API::Boards do
let_it_be(:user) { create(:user) }
let_it_be(:board_parent) { create(:project, :public, creator_id: user.id, namespace: user.namespace ) }
let_it_be(:milestone) { create(:milestone, project: board_parent) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe API::Branches do
RSpec.describe API::Branches do
describe 'PUT /projects/:id/repository/branches/:branch/protect' do
context 'when authenticated', 'as a maintainer' do
let(:user) { create(:user) }
......
# frozen_string_literal: true
require 'spec_helper'
describe API::ComposerPackages do
RSpec.describe API::ComposerPackages do
include EE::PackagesManagerApiSpecHelpers
let_it_be(:user) { create(:user) }
......
# frozen_string_literal: true
require 'spec_helper'
describe API::ConanPackages do
RSpec.describe API::ConanPackages do
include WorkhorseHelpers
include EE::PackagesManagerApiSpecHelpers
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe API::Dependencies do
RSpec.describe API::Dependencies do
let_it_be(:project) { create(:project, :public) }
let_it_be(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe API::DependencyProxy, api: true do
RSpec.describe API::DependencyProxy, api: true do
include ExclusiveLeaseHelpers
let_it_be(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe API::Deployments do
RSpec.describe API::Deployments do
let(:user) { create(:user) }
let!(:project) { create(:project, :repository) }
let!(:environment) { create(:environment, project: project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe API::Discussions do
RSpec.describe API::Discussions do
let(:user) { create(:user) }
let!(:project) { create(:project, :public, :repository, namespace: user.namespace) }
let(:private_user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe API::ElasticsearchIndexedNamespaces do
RSpec.describe API::ElasticsearchIndexedNamespaces do
let_it_be(:admin) { create(:admin) }
let_it_be(:non_admin) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe API::EpicIssues do
RSpec.describe API::EpicIssues do
let(:user) { create(:user) }
let(:group) { create(:group) }
let(:project) { create(:project, :public, group: group) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe API::EpicLinks do
RSpec.describe API::EpicLinks do
let(:user) { create(:user) }
let(:group) { create(:group) }
let(:epic) { create(:epic, group: group) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe API::Epics do
RSpec.describe API::Epics do
let_it_be(:user) { create(:user) }
let(:group) { create(:group) }
let(:project) { create(:project, :public, group: group) }
......
# frozen_string_literal: true
require 'spec_helper'
describe API::FeatureFlagScopes do
RSpec.describe API::FeatureFlagScopes do
include FeatureFlagHelpers
let(:project) { create(:project, :repository) }
......
# frozen_string_literal: true
require 'spec_helper'
describe API::FeatureFlags do
RSpec.describe API::FeatureFlags do
include FeatureFlagHelpers
let(:project) { create(:project, :repository) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe API::FeatureFlagsUserLists do
RSpec.describe API::FeatureFlagsUserLists do
let_it_be(:project) { create(:project) }
let_it_be(:developer) { create(:user) }
let_it_be(:reporter) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe API::GeoNodes, :request_store, :geo_fdw, :prometheus, api: true do
RSpec.describe API::GeoNodes, :request_store, :geo_fdw, :prometheus, api: true do
include ApiHelpers
include ::EE::GeoHelpers
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe API::GeoReplication, :request_store, :geo, :geo_fdw, api: true do
RSpec.describe API::GeoReplication, :request_store, :geo, :geo_fdw, api: true do
include ApiHelpers
include ::EE::GeoHelpers
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe API::Geo do
RSpec.describe API::Geo do
include TermsHelper
include ApiHelpers
include ::EE::GeoHelpers
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe API::GoProxy do
RSpec.describe API::GoProxy do
include EE::PackagesManagerApiSpecHelpers
let_it_be(:user) { create :user }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'get board lists' do
RSpec.describe 'get board lists' do
include GraphqlHelpers
let_it_be(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'get list of boards' do
RSpec.describe 'get list of boards' do
include GraphqlHelpers
include_context 'group and project boards query context'
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'getting project information' do
RSpec.describe 'getting project information' do
include GraphqlHelpers
let_it_be(:current_user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'getting epics information' do
RSpec.describe 'getting epics information' do
include GraphqlHelpers
let_it_be(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'Getting the current Geo node' do
RSpec.describe 'Getting the current Geo node' do
include GraphqlHelpers
include EE::GeoHelpers
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'Gets registries' do
RSpec.describe 'Gets registries' do
it_behaves_like 'gets registries for', {
field_name: 'packageFileRegistries',
registry_class_name: 'PackageFileRegistry',
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'Epic aggregates (count and weight)' do
RSpec.describe 'Epic aggregates (count and weight)' do
include GraphqlHelpers
let_it_be(:current_user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'Getting issues for an epic' do
RSpec.describe 'Getting issues for an epic' do
include GraphqlHelpers
let_it_be(:current_user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'getting notes for an epic' do
RSpec.describe 'getting notes for an epic' do
let(:noteable) { create(:epic) }
before do
......
......@@ -4,7 +4,7 @@ require 'spec_helper'
# Based on ee/spec/requests/api/epics_spec.rb
# Should follow closely in order to ensure all situations are covered
describe 'Epics through GroupQuery' do
RSpec.describe 'Epics through GroupQuery' do
include GraphqlHelpers
let(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'Timelogs through GroupQuery' do
RSpec.describe 'Timelogs through GroupQuery' do
include GraphqlHelpers
describe 'Get list of timelogs from a group issues' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'group(fullPath).vulnerabilitiesCountByDayAndSeverity' do
RSpec.describe 'group(fullPath).vulnerabilitiesCountByDayAndSeverity' do
include GraphqlHelpers
let_it_be(:group) { create(:group) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'getting group information' do
RSpec.describe 'getting group information' do
include GraphqlHelpers
let(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'Query.instanceSecurityDashboard.projects' do
RSpec.describe 'Query.instanceSecurityDashboard.projects' do
include GraphqlHelpers
let_it_be(:project) { create(:project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'Update list limit metrics' do
RSpec.describe 'Update list limit metrics' do
include GraphqlHelpers
let_it_be(:group) { create(:group, :private) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'Updating an epic tree' do
RSpec.describe 'Updating an epic tree' do
include GraphqlHelpers
let(:current_user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'Add an issue to an Epic' do
RSpec.describe 'Add an issue to an Epic' do
include GraphqlHelpers
let_it_be(:current_user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'Creating an Epic' do
RSpec.describe 'Creating an Epic' do
include GraphqlHelpers
let_it_be(:current_user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'Set an Epic Subscription' do
RSpec.describe 'Set an Epic Subscription' do
include GraphqlHelpers
let_it_be(:current_user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Mutations::Epics::Update do
RSpec.describe Mutations::Epics::Update do
include GraphqlHelpers
let_it_be(:current_user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'Setting weight of an issue' do
RSpec.describe 'Setting weight of an issue' do
include GraphqlHelpers
let(:current_user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'Creating an Iteration' do
RSpec.describe 'Creating an Iteration' do
include GraphqlHelpers
let_it_be(:current_user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'Setting assignees of a merge request' do
RSpec.describe 'Setting assignees of a merge request' do
include GraphqlHelpers
let(:current_user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'Adding a Note to an Epic' do
RSpec.describe 'Adding a Note to an Epic' do
include GraphqlHelpers
let_it_be(:current_user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'Creating a Requirement' do
RSpec.describe 'Creating a Requirement' do
include GraphqlHelpers
let_it_be(:current_user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'Updating a Requirement' do
RSpec.describe 'Updating a Requirement' do
include GraphqlHelpers
let_it_be(:current_user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'getting an issue list for a project' do
RSpec.describe 'getting an issue list for a project' do
include GraphqlHelpers
let_it_be(:current_user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'getting a package list for a project' do
RSpec.describe 'getting a package list for a project' do
include GraphqlHelpers
let_it_be(:project) { create(:project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'getting requirement counts for a project' do
RSpec.describe 'getting requirement counts for a project' do
include GraphqlHelpers
let_it_be(:project) { create(:project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'getting a requirement list for a project' do
RSpec.describe 'getting a requirement list for a project' do
include GraphqlHelpers
let_it_be(:project) { create(:project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'getting test reports of a requirement' do
RSpec.describe 'getting test reports of a requirement' do
include GraphqlHelpers
let_it_be(:current_user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'Query.project(fullPath).vulnerabilitySeveritiesCount' do
RSpec.describe 'Query.project(fullPath).vulnerabilitySeveritiesCount' do
let_it_be(:project) { create(:project) }
let_it_be(:user) { create(:user) }
let_it_be(:confirmed_vulnerability) { create(:vulnerability, :confirmed, :high, project: project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'Query' do
RSpec.describe 'Query' do
include GraphqlHelpers
describe '.vulnerabilitiesCountByDayAndSeverity' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'Query.vulnerabilities.location' do
RSpec.describe 'Query.vulnerabilities.location' do
include GraphqlHelpers
subject { graphql_data.dig('vulnerabilities', 'nodes') }
......
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