Commit 02b3d141 authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre

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

RSpec zero monkey patching mode

See merge request gitlab-org/gitlab!33733
parents 247352ac 4c0a7256
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Geo::DesignRepositorySyncWorker, :geo do
RSpec.describe Geo::DesignRepositorySyncWorker, :geo do
describe '#perform' do
it 'runs DesignRepositorySyncService' do
project = create(:project)
......
......@@ -2,7 +2,7 @@
require "spec_helper"
describe Geo::EventWorker, :geo do
RSpec.describe Geo::EventWorker, :geo do
describe "#perform" do
it "calls Geo::EventService" do
args = ["package_file", "created", { "model_record_id" => 1 }]
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Geo::FileDownloadDispatchWorker, :geo, :geo_fdw, :use_sql_query_cache_for_tracking_db do
RSpec.describe Geo::FileDownloadDispatchWorker, :geo, :geo_fdw, :use_sql_query_cache_for_tracking_db do
include ::EE::GeoHelpers
include ExclusiveLeaseHelpers
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Geo::FileDownloadWorker, :geo do
RSpec.describe Geo::FileDownloadWorker, :geo do
describe '#perform' do
it 'instantiates and executes FileDownloadService' do
service = double(:service)
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Geo::MigratedLocalFilesCleanUpWorker, :geo, :geo_fdw, :use_sql_query_cache_for_tracking_db do
RSpec.describe Geo::MigratedLocalFilesCleanUpWorker, :geo, :geo_fdw, :use_sql_query_cache_for_tracking_db do
include ::EE::GeoHelpers
include ExclusiveLeaseHelpers
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Geo::PruneEventLogWorker, :geo do
RSpec.describe Geo::PruneEventLogWorker, :geo do
include ::EE::GeoHelpers
subject(:worker) { described_class.new }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Geo::RepositoriesCleanUpWorker, :geo, :geo_fdw do
RSpec.describe Geo::RepositoriesCleanUpWorker, :geo, :geo_fdw do
include ::EE::GeoHelpers
include ExclusiveLeaseHelpers
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Geo::RepositoryCleanupWorker, :geo do
RSpec.describe Geo::RepositoryCleanupWorker, :geo do
include ::EE::GeoHelpers
describe '#perform' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Geo::RepositoryShardSyncWorker, :geo, :geo_fdw, :clean_gitlab_redis_cache, :use_sql_query_cache_for_tracking_db do
RSpec.describe Geo::RepositoryShardSyncWorker, :geo, :geo_fdw, :clean_gitlab_redis_cache, :use_sql_query_cache_for_tracking_db do
include ::EE::GeoHelpers
include ExclusiveLeaseHelpers
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Geo::RepositorySyncWorker, :geo, :clean_gitlab_redis_cache do
RSpec.describe Geo::RepositorySyncWorker, :geo, :clean_gitlab_redis_cache do
include ::EE::GeoHelpers
let!(:primary) { create(:geo_node, :primary) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Geo::RepositoryVerification::Primary::BatchWorker, :clean_gitlab_redis_cache do
RSpec.describe Geo::RepositoryVerification::Primary::BatchWorker, :clean_gitlab_redis_cache do
include ::EE::GeoHelpers
let_it_be(:healthy_not_verified) { create(:project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Geo::RepositoryVerification::Primary::ShardWorker, :clean_gitlab_redis_cache do
RSpec.describe Geo::RepositoryVerification::Primary::ShardWorker, :clean_gitlab_redis_cache do
include ::EE::GeoHelpers
include ExclusiveLeaseHelpers
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Geo::RepositoryVerification::Primary::SingleWorker, :clean_gitlab_redis_cache do
RSpec.describe Geo::RepositoryVerification::Primary::SingleWorker, :clean_gitlab_redis_cache do
include ::EE::GeoHelpers
include ExclusiveLeaseHelpers
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Geo::RepositoryVerification::Secondary::SchedulerWorker, :clean_gitlab_redis_cache do
RSpec.describe Geo::RepositoryVerification::Secondary::SchedulerWorker, :clean_gitlab_redis_cache do
include ::EE::GeoHelpers
let_it_be(:healthy_not_verified) { create(:project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Geo::RepositoryVerification::Secondary::ShardWorker, :geo, :geo_fdw, :request_store, :clean_gitlab_redis_cache, :use_sql_query_cache_for_tracking_db do
RSpec.describe Geo::RepositoryVerification::Secondary::ShardWorker, :geo, :geo_fdw, :request_store, :clean_gitlab_redis_cache, :use_sql_query_cache_for_tracking_db do
include ::EE::GeoHelpers
include ExclusiveLeaseHelpers
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Geo::RepositoryVerification::Secondary::SingleWorker, :clean_gitlab_redis_cache do
RSpec.describe Geo::RepositoryVerification::Secondary::SingleWorker, :clean_gitlab_redis_cache do
include ::EE::GeoHelpers
include ExclusiveLeaseHelpers
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Geo::Scheduler::PerShardSchedulerWorker do
RSpec.describe Geo::Scheduler::PerShardSchedulerWorker do
it 'includes ApplicationWorker' do
expect(described_class).to include_module(ApplicationWorker)
end
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Geo::Scheduler::SchedulerWorker, :geo do
RSpec.describe Geo::Scheduler::SchedulerWorker, :geo do
subject { described_class.new }
it 'includes ::Gitlab::Geo::LogHelpers' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Geo::Secondary::RegistryConsistencyWorker, :geo, :geo_fdw do
RSpec.describe Geo::Secondary::RegistryConsistencyWorker, :geo, :geo_fdw do
include EE::GeoHelpers
include ExclusiveLeaseHelpers
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Geo::Secondary::RepositoryBackfillWorker, :geo, :geo_fdw, :clean_gitlab_redis_cache do
RSpec.describe Geo::Secondary::RepositoryBackfillWorker, :geo, :geo_fdw, :clean_gitlab_redis_cache do
include EE::GeoHelpers
let(:primary) { create(:geo_node, :primary) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Geo::SidekiqCronConfigWorker do
RSpec.describe Geo::SidekiqCronConfigWorker do
describe '#perform' do
it 'runs the cron manager' do
manager = double('cron_manager')
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GeoRepositoryDestroyWorker do
RSpec.describe GeoRepositoryDestroyWorker do
describe '#perform' do
it 'delegates project removal to Geo::RepositoryDestroyService' do
project = create(:project)
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe HistoricalDataWorker do
RSpec.describe HistoricalDataWorker do
subject { described_class.new }
describe '#perform' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ImportSoftwareLicensesWorker do
RSpec.describe ImportSoftwareLicensesWorker do
let(:catalogue) { build(:spdx_catalogue) }
let(:spdx_apache_license) { build(:spdx_license, :apache_1) }
let(:spdx_bsd_license) { build(:spdx_license, :bsd) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe JiraConnect::SyncBranchWorker do
RSpec.describe JiraConnect::SyncBranchWorker do
describe '#perform' do
let_it_be(:project) { create(:project, :repository) }
let(:project_id) { project.id }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe JiraConnect::SyncMergeRequestWorker do
RSpec.describe JiraConnect::SyncMergeRequestWorker do
describe '#perform' do
let(:merge_request) { create(:merge_request) }
let(:merge_request_id) { merge_request.id }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe LdapAllGroupsSyncWorker do
RSpec.describe LdapAllGroupsSyncWorker do
let(:subject) { described_class.new }
before do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe LdapGroupSyncWorker do
RSpec.describe LdapGroupSyncWorker do
include LdapHelpers
let(:subject) { described_class.new }
let(:group) { create(:group) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe LdapSyncWorker do
RSpec.describe LdapSyncWorker do
let(:subject) { described_class.new }
before do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe NewEpicWorker do
RSpec.describe NewEpicWorker do
describe '#perform' do
let(:worker) { described_class.new }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe PostReceive do
RSpec.describe PostReceive do
let(:changes) { "123456 789012 refs/heads/tést\n654321 210987 refs/tags/tag" }
let(:changes_with_master) { "#{changes}\n423423 797823 refs/heads/master" }
let(:wrongly_encoded_changes) { changes.encode("ISO-8859-1").force_encoding("UTF-8") }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ProjectCacheWorker do
RSpec.describe ProjectCacheWorker do
let(:worker) { described_class.new }
let(:project) { create(:project, :repository) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ProjectImportScheduleWorker do
RSpec.describe ProjectImportScheduleWorker do
describe '#perform' do
it 'does nothing if the database is read-only' do
project = create(:project)
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe PurgeDependencyProxyCacheWorker do
RSpec.describe PurgeDependencyProxyCacheWorker do
let_it_be(:user) { create(:admin) }
let_it_be(:blob) { create(:dependency_proxy_blob )}
let_it_be(:group) { blob.group }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe RefreshLicenseComplianceChecksWorker do
RSpec.describe RefreshLicenseComplianceChecksWorker do
subject { described_class.new }
describe '#perform' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe RemoveUnreferencedLfsObjectsWorker do
RSpec.describe RemoveUnreferencedLfsObjectsWorker do
include EE::GeoHelpers
describe '#perform' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe RepositoryImportWorker do
RSpec.describe RepositoryImportWorker do
let(:project) { create(:project, :import_scheduled) }
it 'updates the error on custom project template Import/Export' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe RepositoryPushAuditEventWorker do
RSpec.describe RepositoryPushAuditEventWorker do
describe '#perform' do
let(:project) { create(:project, :repository) }
let(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe RepositoryUpdateMirrorWorker do
RSpec.describe RepositoryUpdateMirrorWorker do
describe '#perform' do
let(:jid) { '12345678' }
let!(:project) { create(:project) }
......
......@@ -2,7 +2,7 @@
require "spec_helper"
describe ServiceDeskEmailReceiverWorker, :mailer do
RSpec.describe ServiceDeskEmailReceiverWorker, :mailer do
describe '#perform' do
let(:worker) { described_class.new }
let(:email) { fixture_file('emails/service_desk_custom_address.eml', dir: 'ee') }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe StatusPage::PublishWorker do
RSpec.describe StatusPage::PublishWorker do
include ExclusiveLeaseHelpers
let_it_be(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe StoreSecurityReportsWorker do
RSpec.describe StoreSecurityReportsWorker do
describe '#perform' do
let(:group) { create(:group) }
let(:project) { create(:project, namespace: group) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe StoreSecurityScansWorker do
RSpec.describe StoreSecurityScansWorker do
describe '#perform' do
context 'build has security reports' do
let(:build) { create(:ci_build, :dast) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe SyncSeatLinkRequestWorker, type: :worker do
RSpec.describe SyncSeatLinkRequestWorker, type: :worker do
describe '#perform' do
subject do
described_class.new.perform('2020-01-01', '123', 5, 4)
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe SyncSeatLinkWorker, type: :worker do
RSpec.describe SyncSeatLinkWorker, type: :worker do
describe '#perform' do
context 'when current, paid license is active' do
let(:utc_time) { Time.utc(2020, 3, 12, 12, 00) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe SyncSecurityReportsToReportApprovalRulesWorker do
RSpec.describe SyncSecurityReportsToReportApprovalRulesWorker do
describe '#perform' do
let(:pipeline) { double(:pipeline, id: 42) }
let(:sync_service) { double(:service, execute: true) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe UpdateAllMirrorsWorker do
RSpec.describe UpdateAllMirrorsWorker do
include ExclusiveLeaseHelpers
subject(:worker) { described_class.new }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe UpdateMaxSeatsUsedForGitlabComSubscriptionsWorker do
RSpec.describe UpdateMaxSeatsUsedForGitlabComSubscriptionsWorker do
subject { described_class.new }
let!(:user) { create(:user) }
......
......@@ -4,7 +4,7 @@ require 'spec_helper'
load File.expand_path('../../bin/changelog', __dir__)
describe 'bin/changelog' do
RSpec.describe 'bin/changelog' do
let(:options) { OpenStruct.new(title: 'Test title', type: 'fixed', dry_run: true) }
describe ChangelogEntry do
......
......@@ -3,7 +3,7 @@
require 'spec_helper'
require 'shellwords'
describe 'bin/sidekiq-cluster' do
RSpec.describe 'bin/sidekiq-cluster' do
using RSpec::Parameterized::TableSyntax
context 'when selecting some queues and excluding others' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ApplicationCable::Connection, :clean_gitlab_redis_shared_state do
RSpec.describe ApplicationCable::Connection, :clean_gitlab_redis_shared_state do
let(:session_id) { Rack::Session::SessionId.new('6919a6f1bb119dd7396fadc38fd18d0d') }
before do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe IssuesChannel do
RSpec.describe IssuesChannel do
let_it_be(:issue) { create(:issue) }
it 'rejects when project path is invalid' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Application do # rubocop:disable RSpec/FilePath
RSpec.describe Gitlab::Application do # rubocop:disable RSpec/FilePath
using RSpec::Parameterized::TableSyntax
filtered_param = ActiveSupport::ParameterFilter::FILTERED
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'mail_room.yml' do
RSpec.describe 'mail_room.yml' do
include StubENV
let(:mailroom_config_path) { 'config/mail_room.yml' }
......
......@@ -3,7 +3,7 @@
require 'spec_helper'
require Rails.root.join('config', 'object_store_settings.rb')
describe ObjectStoreSettings do
RSpec.describe ObjectStoreSettings do
describe '.parse' do
it 'sets correct default values' do
settings = described_class.parse(nil)
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Settings do
RSpec.describe Settings do
describe 'omniauth' do
it 'defaults to enabled' do
expect(described_class.omniauth.enabled).to be true
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe SmimeSignatureSettings do
RSpec.describe SmimeSignatureSettings do
describe '.parse' do
let(:default_smime_key) { Rails.root.join('.gitlab_smime_key') }
let(:default_smime_cert) { Rails.root.join('.gitlab_smime_cert') }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe AbuseReportsController do
RSpec.describe AbuseReportsController do
let(:reporter) { create(:user) }
let(:user) { create(:user) }
let(:attrs) do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe AcmeChallengesController do
RSpec.describe AcmeChallengesController do
describe '#show' do
let!(:acme_order) { create(:pages_domain_acme_order) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Admin::AppearancesController do
RSpec.describe Admin::AppearancesController do
let(:admin) { create(:admin) }
let(:header_message) { 'Header message' }
let(:footer_message) { 'Footer' }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Admin::ApplicationSettingsController do
RSpec.describe Admin::ApplicationSettingsController do
include StubENV
include UsageDataHelpers
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Admin::ApplicationsController do
RSpec.describe Admin::ApplicationsController do
let(:admin) { create(:admin) }
let(:application) { create(:oauth_application, owner_id: nil, owner_type: nil) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Admin::Ci::VariablesController do
RSpec.describe Admin::Ci::VariablesController do
let_it_be(:variable) { create(:ci_instance_variable) }
before do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Admin::Clusters::ApplicationsController do
RSpec.describe Admin::Clusters::ApplicationsController do
include AccessMatchersForController
def current_application
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Admin::ClustersController do
RSpec.describe Admin::ClustersController do
include AccessMatchersForController
include GoogleApi::CloudPlatformHelpers
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Admin::DashboardController do
RSpec.describe Admin::DashboardController do
describe '#index' do
context 'with pending_delete projects' do
render_views
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Admin::GitalyServersController do
RSpec.describe Admin::GitalyServersController do
describe '#index' do
before do
sign_in(create(:admin))
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Admin::GroupsController do
RSpec.describe Admin::GroupsController do
let(:group) { create(:group) }
let(:project) { create(:project, namespace: group) }
let(:admin) { create(:admin) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Admin::HealthCheckController do
RSpec.describe Admin::HealthCheckController do
let(:admin) { create(:admin) }
before do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Admin::HooksController do
RSpec.describe Admin::HooksController do
let(:admin) { create(:admin) }
before do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Admin::IdentitiesController do
RSpec.describe Admin::IdentitiesController do
let(:admin) { create(:admin) }
before do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Admin::ImpersonationsController do
RSpec.describe Admin::ImpersonationsController do
let(:impersonator) { create(:admin) }
let(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Admin::IntegrationsController do
RSpec.describe Admin::IntegrationsController do
let(:admin) { create(:admin) }
let(:integration) { create(:jira_service, :instance) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Admin::ProjectsController do
RSpec.describe Admin::ProjectsController do
let!(:project) { create(:project, :public) }
before do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Admin::RequestsProfilesController do
RSpec.describe Admin::RequestsProfilesController do
let_it_be(:admin) { create(:admin) }
before do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Admin::RunnersController do
RSpec.describe Admin::RunnersController do
let_it_be(:runner) { create(:ci_runner) }
before do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Admin::Serverless::DomainsController do
RSpec.describe Admin::Serverless::DomainsController do
let(:admin) { create(:admin) }
let(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Admin::ServicesController do
RSpec.describe Admin::ServicesController do
let(:admin) { create(:admin) }
before do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Admin::SessionsController, :do_not_mock_admin_mode do
RSpec.describe Admin::SessionsController, :do_not_mock_admin_mode do
include_context 'custom session'
let(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Admin::SpamLogsController do
RSpec.describe Admin::SpamLogsController do
let(:admin) { create(:admin) }
let(:user) { create(:user) }
let!(:first_spam) { create(:spam_log, user: user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Admin::UsersController do
RSpec.describe Admin::UsersController do
let(:user) { create(:user) }
let_it_be(:admin) { create(:admin) }
......
# frozen_string_literal: true
require 'spec_helper'
describe ApplicationController do
RSpec.describe ApplicationController do
include TermsHelper
let(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe AutocompleteController do
RSpec.describe AutocompleteController do
let(:project) { create(:project) }
let(:user) { project.owner }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Boards::IssuesController do
RSpec.describe Boards::IssuesController do
include ExternalAuthorizationServiceHelpers
let(:project) { create(:project, :private) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Boards::ListsController do
RSpec.describe Boards::ListsController do
let(:project) { create(:project) }
let(:board) { create(:board, project: project) }
let(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ChaosController do
RSpec.describe ChaosController do
describe '#leakmem' do
it 'calls synchronously' do
expect(Gitlab::Chaos).to receive(:leak_mem).with(100, 30.seconds)
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe BoardsResponses do
RSpec.describe BoardsResponses do
let(:controller_class) do
Class.new do
include BoardsResponses
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ChecksCollaboration do
RSpec.describe ChecksCollaboration do
include ProjectForksHelper
let(:helper) do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ConfirmEmailWarning do
RSpec.describe ConfirmEmailWarning do
before do
stub_feature_flags(soft_email_confirmation: true)
end
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ContinueParams do
RSpec.describe ContinueParams do
let(:controller_class) do
Class.new(ActionController::Base) do
include ContinueParams
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ControllerWithCrossProjectAccessCheck do
RSpec.describe ControllerWithCrossProjectAccessCheck do
let(:user) { create(:user) }
before do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe EnforcesAdminAuthentication do
RSpec.describe EnforcesAdminAuthentication do
include AdminModeHelper
let(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GroupTree do
RSpec.describe GroupTree do
let(:group) { create(:group, :public) }
let(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ImportUrlParams do
RSpec.describe ImportUrlParams do
let(:import_url_params) do
controller = OpenStruct.new(params: params).extend(described_class)
controller.import_url_params
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe InternalRedirect do
RSpec.describe InternalRedirect do
let(:controller_class) do
Class.new do
include InternalRedirect
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe IssuableActions do
RSpec.describe IssuableActions do
let(:project) { double('project') }
let(:user) { double('user') }
let(:issuable) { double('issuable') }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe IssuableCollections do
RSpec.describe IssuableCollections do
let(:user) { create(:user) }
let(:controller) do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe LfsRequest do
RSpec.describe LfsRequest do
include ProjectForksHelper
controller(Repositories::GitHttpClientController) do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe MetricsDashboard do
RSpec.describe MetricsDashboard do
include MetricsDashboardHelpers
describe 'GET #metrics_dashboard' do
......
......@@ -14,7 +14,7 @@ class PageLimiterSpecController < ApplicationController
end
end
describe PageLimiter do
RSpec.describe PageLimiter do
let(:controller_class) do
PageLimiterSpecController
end
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ProjectUnauthorized do
RSpec.describe ProjectUnauthorized do
include ExternalAuthorizationServiceHelpers
let(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe RedirectsForMissingPathOnTree, type: :controller do
RSpec.describe RedirectsForMissingPathOnTree, type: :controller do
controller(ActionController::Base) do
include Gitlab::Routing.url_helpers
include RedirectsForMissingPathOnTree
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe RendersCommits do
RSpec.describe RendersCommits do
let_it_be(:project) { create(:project, :public, :repository) }
let_it_be(:merge_request) { create(:merge_request, source_project: project) }
let_it_be(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe RoutableActions do
RSpec.describe RoutableActions do
controller(::ApplicationController) do
include RoutableActions
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe SendFileUpload do
RSpec.describe SendFileUpload do
let(:uploader_class) do
Class.new(GitlabUploader) do
include ObjectStorage::Concern
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe SortingPreference do
RSpec.describe SortingPreference do
let(:user) { create(:user) }
let(:controller_class) do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe SourcegraphDecorator do
RSpec.describe SourcegraphDecorator do
let_it_be(:enabled_user) { create(:user, sourcegraph_enabled: true) }
let_it_be(:disabled_user) { create(:user, sourcegraph_enabled: false) }
let_it_be(:public_project) { create(:project, :public) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe StaticObjectExternalStorage do
RSpec.describe StaticObjectExternalStorage do
controller(Projects::ApplicationController) do
include StaticObjectExternalStorage
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Dashboard::GroupsController do
RSpec.describe Dashboard::GroupsController do
include ExternalAuthorizationServiceHelpers
let(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Dashboard::LabelsController do
RSpec.describe Dashboard::LabelsController do
let(:project) { create(:project) }
let(:user) { create(:user) }
let!(:label) { create(:label, project: project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Dashboard::MilestonesController do
RSpec.describe Dashboard::MilestonesController do
let(:project) { create(:project) }
let(:group) { create(:group) }
let(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Dashboard::ProjectsController do
RSpec.describe Dashboard::ProjectsController do
include ExternalAuthorizationServiceHelpers
describe '#index' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Dashboard::SnippetsController do
RSpec.describe Dashboard::SnippetsController do
let(:user) { create(:user) }
before do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Dashboard::TodosController do
RSpec.describe Dashboard::TodosController do
let(:user) { create(:user) }
let(:author) { create(:user) }
let(:project) { create(:project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe DashboardController do
RSpec.describe DashboardController do
context 'signed in' do
let(:user) { create(:user) }
let(:project) { create(:project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Explore::GroupsController do
RSpec.describe Explore::GroupsController do
let(:user) { create(:user) }
before do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Explore::ProjectsController do
RSpec.describe Explore::ProjectsController do
shared_examples 'explore projects' do
describe 'GET #index.json' do
render_views
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Explore::SnippetsController do
RSpec.describe Explore::SnippetsController do
describe 'GET #index' do
let!(:project_snippet) { create_list(:project_snippet, 3, :public) }
let!(:personal_snippet) { create_list(:personal_snippet, 3, :public) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GoogleApi::AuthorizationsController do
RSpec.describe GoogleApi::AuthorizationsController do
describe 'GET|POST #callback' do
let(:user) { create(:user) }
let(:token) { 'token' }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GraphqlController do
RSpec.describe GraphqlController do
include GraphqlHelpers
before do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Groups::AvatarsController do
RSpec.describe Groups::AvatarsController do
include ExternalAuthorizationServiceHelpers
let(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Groups::BoardsController do
RSpec.describe Groups::BoardsController do
let(:group) { create(:group) }
let(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Groups::ChildrenController do
RSpec.describe Groups::ChildrenController do
include ExternalAuthorizationServiceHelpers
let(:group) { create(:group, :public) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Groups::Clusters::ApplicationsController do
RSpec.describe Groups::Clusters::ApplicationsController do
include AccessMatchersForController
def current_application
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Groups::ClustersController do
RSpec.describe Groups::ClustersController do
include AccessMatchersForController
include GoogleApi::CloudPlatformHelpers
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Groups::GroupLinksController do
RSpec.describe Groups::GroupLinksController do
let(:shared_with_group) { create(:group, :private) }
let(:shared_group) { create(:group, :private) }
let(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Groups::GroupMembersController do
RSpec.describe Groups::GroupMembersController do
include ExternalAuthorizationServiceHelpers
let(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Groups::LabelsController do
RSpec.describe Groups::LabelsController do
let_it_be(:group) { create(:group) }
let_it_be(:user) { create(:user) }
let_it_be(:project) { create(:project, namespace: group) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Groups::MilestonesController do
RSpec.describe Groups::MilestonesController do
let(:group) { create(:group, :public) }
let!(:project) { create(:project, :public, group: group) }
let!(:project2) { create(:project, group: group) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Groups::Registry::RepositoriesController do
RSpec.describe Groups::Registry::RepositoriesController do
let_it_be(:user) { create(:user) }
let_it_be(:guest) { create(:user) }
let_it_be(:group, reload: true) { create(:group) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Groups::RunnersController do
RSpec.describe Groups::RunnersController do
let(:user) { create(:user) }
let(:group) { create(:group) }
let(:runner) { create(:ci_runner, :group, groups: [group]) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Groups::Settings::CiCdController do
RSpec.describe Groups::Settings::CiCdController do
include ExternalAuthorizationServiceHelpers
let(:group) { create(:group) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Groups::Settings::IntegrationsController do
RSpec.describe Groups::Settings::IntegrationsController do
let_it_be(:project) { create(:project) }
let(:user) { create(:user) }
let(:group) { create(:group) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Groups::Settings::RepositoryController do
RSpec.describe Groups::Settings::RepositoryController do
include ExternalAuthorizationServiceHelpers
let(:group) { create(:group) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Groups::SharedProjectsController do
RSpec.describe Groups::SharedProjectsController do
def get_shared_projects(params = {})
get :index, params: params.reverse_merge(format: :json, group_id: group.full_path)
end
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Groups::UploadsController do
RSpec.describe Groups::UploadsController do
include WorkhorseHelpers
let(:model) { create(:group, :public) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Groups::VariablesController do
RSpec.describe Groups::VariablesController do
include ExternalAuthorizationServiceHelpers
let(:group) { create(:group) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GroupsController do
RSpec.describe GroupsController do
include ExternalAuthorizationServiceHelpers
let(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe HealthCheckController, :request_store do
RSpec.describe HealthCheckController, :request_store do
include StubENV
let(:xml_response) { Hash.from_xml(response.body)['hash'] }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe HelpController do
RSpec.describe HelpController do
let(:user) { create(:user) }
before do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe IdeController do
RSpec.describe IdeController do
let(:user) { create(:user) }
before do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Import::BitbucketController do
RSpec.describe Import::BitbucketController do
include ImportSpecHelper
let(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Import::BitbucketServerController do
RSpec.describe Import::BitbucketServerController do
let(:user) { create(:user) }
let(:project_key) { 'test-project' }
let(:repo_slug) { 'some-repo' }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Import::FogbugzController do
RSpec.describe Import::FogbugzController do
include ImportSpecHelper
let(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Import::GiteaController do
RSpec.describe Import::GiteaController do
include ImportSpecHelper
let(:provider) { :gitea }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Import::GithubController do
RSpec.describe Import::GithubController do
include ImportSpecHelper
let(:provider) { :github }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Import::GitlabController do
RSpec.describe Import::GitlabController do
include ImportSpecHelper
let(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Import::GoogleCodeController do
RSpec.describe Import::GoogleCodeController do
include ImportSpecHelper
let(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Import::PhabricatorController do
RSpec.describe Import::PhabricatorController do
let(:current_user) { create(:user) }
before do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe InstanceStatistics::CohortsController do
RSpec.describe InstanceStatistics::CohortsController do
let(:user) { create(:user) }
before 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