Commit f820fc9f authored by Jan Provaznik's avatar Jan Provaznik

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

RSpec zero monkey patching mode

See merge request gitlab-org/gitlab!33707
parents 4210d5ba 090f4813
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Admin::ApplicationSettingsController do RSpec.describe Admin::ApplicationSettingsController do
include StubENV include StubENV
let(:admin) { create(:admin) } let(:admin) { create(:admin) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Admin::ApplicationsController do RSpec.describe Admin::ApplicationsController do
let(:admin) { create(:admin) } let(:admin) { create(:admin) }
let(:application) { create(:oauth_application, owner_id: nil, owner_type: nil) } let(:application) { create(:oauth_application, owner_id: nil, owner_type: nil) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Admin::AuditLogsController do RSpec.describe Admin::AuditLogsController do
let(:admin) { create(:admin) } let(:admin) { create(:admin) }
describe 'GET #index' do describe 'GET #index' do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Admin::ClustersController do RSpec.describe Admin::ClustersController do
include AccessMatchersForController include AccessMatchersForController
let(:user) { create(:admin) } let(:user) { create(:admin) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Admin::CredentialsController do RSpec.describe Admin::CredentialsController do
describe 'GET #index' do describe 'GET #index' do
context 'admin user' do context 'admin user' do
before do before do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Admin::DashboardController do RSpec.describe Admin::DashboardController do
describe '#index' do describe '#index' do
render_views render_views
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Admin::ElasticsearchController do RSpec.describe Admin::ElasticsearchController do
let(:admin) { create(:admin) } let(:admin) { create(:admin) }
describe 'POST #enqueue_index' do describe 'POST #enqueue_index' do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Admin::EmailsController, :clean_gitlab_redis_shared_state do RSpec.describe Admin::EmailsController, :clean_gitlab_redis_shared_state do
include ExclusiveLeaseHelpers include ExclusiveLeaseHelpers
let_it_be(:admin) { create(:admin) } let_it_be(:admin) { create(:admin) }
......
# frozen_string_literal: true # frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Admin::Geo::NodesController do RSpec.describe Admin::Geo::NodesController do
shared_examples 'unlicensed geo action' do shared_examples 'unlicensed geo action' do
it 'redirects to the 403 page' do it 'redirects to the 403 page' do
expect(response).to have_gitlab_http_status(:forbidden) expect(response).to have_gitlab_http_status(:forbidden)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Admin::Geo::ProjectsController, :geo do RSpec.describe Admin::Geo::ProjectsController, :geo do
include EE::GeoHelpers include EE::GeoHelpers
let_it_be(:admin) { create(:admin) } let_it_be(:admin) { create(:admin) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Admin::Geo::SettingsController, :geo do RSpec.describe Admin::Geo::SettingsController, :geo do
include EE::GeoHelpers include EE::GeoHelpers
include StubENV include StubENV
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Admin::Geo::UploadsController, :geo do RSpec.describe Admin::Geo::UploadsController, :geo do
include EE::GeoHelpers include EE::GeoHelpers
let_it_be(:admin) { create(:admin) } let_it_be(:admin) { create(:admin) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Admin::GroupsController do RSpec.describe Admin::GroupsController do
let(:admin) { create(:admin) } let(:admin) { create(:admin) }
let(:group) { create(:group) } let(:group) { create(:group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Admin::ImpersonationsController do RSpec.describe Admin::ImpersonationsController do
let(:impersonator) { create(:admin) } let(:impersonator) { create(:admin) }
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Admin::InstanceReviewController do RSpec.describe Admin::InstanceReviewController do
include UsageDataHelpers include UsageDataHelpers
let(:admin) { create(:admin) } let(:admin) { create(:admin) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Admin::LicensesController do RSpec.describe Admin::LicensesController do
let(:admin) { create(:admin) } let(:admin) { create(:admin) }
before do before do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Admin::ProjectsController, :geo do RSpec.describe Admin::ProjectsController, :geo do
include EE::GeoHelpers include EE::GeoHelpers
let!(:project_registry) { create(:geo_project_registry) } let!(:project_registry) { create(:geo_project_registry) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Admin::PushRulesController do RSpec.describe Admin::PushRulesController do
include StubENV include StubENV
let(:admin) { create(:admin) } let(:admin) { create(:admin) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Admin::UsersController do RSpec.describe Admin::UsersController do
let(:admin) { create(:admin) } let(:admin) { create(:admin) }
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Analytics::AnalyticsController do RSpec.describe Analytics::AnalyticsController do
let(:user) { create(:user) } let(:user) { create(:user) }
before do before do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Analytics::CycleAnalytics::StagesController do RSpec.describe Analytics::CycleAnalytics::StagesController do
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
let_it_be(:group, refind: true) { create(:group) } let_it_be(:group, refind: true) { create(:group) }
let(:params) { { group_id: group.full_path } } let(:params) { { group_id: group.full_path } }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Analytics::CycleAnalytics::SummaryController do RSpec.describe Analytics::CycleAnalytics::SummaryController do
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
let_it_be(:group, refind: true) { create(:group) } let_it_be(:group, refind: true) { create(:group) }
let(:params) { { group_id: group.full_path, created_after: '2010-01-01', created_before: '2010-01-02' } } let(:params) { { group_id: group.full_path, created_after: '2010-01-01', created_before: '2010-01-02' } }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Analytics::CycleAnalyticsController do RSpec.describe Analytics::CycleAnalyticsController do
let(:user) { create(:user) } let(:user) { create(:user) }
before do before do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Analytics::TasksByTypeController do RSpec.describe Analytics::TasksByTypeController do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:group) { create(:group) } let(:group) { create(:group) }
let(:label) { create(:group_label, group: group) } let(:label) { create(:group_label, group: group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe AutocompleteController do RSpec.describe AutocompleteController do
let(:project) { create(:project) } let(:project) { create(:project) }
let(:user) { project.owner } let(:user) { project.owner }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Boards::IssuesController do RSpec.describe Boards::IssuesController do
include ExternalAuthorizationServiceHelpers include ExternalAuthorizationServiceHelpers
let(:group) { create(:group, :private) } let(:group) { create(:group, :private) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Boards::ListsController do RSpec.describe Boards::ListsController do
let_it_be(:group) { create(:group, :private) } let_it_be(:group) { create(:group, :private) }
let_it_be(:board) { create(:board, group: group) } let_it_be(:board) { create(:board, group: group) }
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Boards::MilestonesController do RSpec.describe Boards::MilestonesController do
let(:project) { create(:project, :private) } let(:project) { create(:project, :private) }
let(:board) { create(:board, project: project) } let(:board) { create(:board, project: project) }
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Boards::UsersController do RSpec.describe Boards::UsersController do
let(:group) { create(:group, :private) } let(:group) { create(:group, :private) }
let(:board) { create(:board, group: group) } let(:board) { create(:board, group: group) }
let(:guest) { create(:user) } let(:guest) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe BoardsResponses do RSpec.describe BoardsResponses do
let(:controller_class) do let(:controller_class) do
Class.new do Class.new do
include BoardsResponses include BoardsResponses
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe EE::RoutableActions::SsoEnforcementRedirect do RSpec.describe EE::RoutableActions::SsoEnforcementRedirect do
let(:saml_provider) { create(:saml_provider, enforced_sso: true) } let(:saml_provider) { create(:saml_provider, enforced_sso: true) }
let(:root_group) { saml_provider.group } let(:root_group) { saml_provider.group }
let(:nested_group) { create(:group, :private, parent: root_group) } let(:nested_group) { create(:group, :private, parent: root_group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe InternalRedirect do RSpec.describe InternalRedirect do
let(:controller_class) do let(:controller_class) do
Class.new do Class.new do
include InternalRedirect include InternalRedirect
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe RoutableActions do RSpec.describe RoutableActions do
controller(::ApplicationController) do controller(::ApplicationController) do
include RoutableActions include RoutableActions
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe CountriesController do RSpec.describe CountriesController do
describe 'GET #index' do describe 'GET #index' do
it 'returns list of countries as json' do it 'returns list of countries as json' do
get :index get :index
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe CountryStatesController do RSpec.describe CountryStatesController do
describe 'GET #index' do describe 'GET #index' do
it 'returns a list of states as json' do it 'returns a list of states as json' do
country = 'NL' country = 'NL'
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Dashboard::ProjectsController do RSpec.describe Dashboard::ProjectsController do
include ExternalAuthorizationServiceHelpers include ExternalAuthorizationServiceHelpers
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe GroupsController do RSpec.describe GroupsController do
include ExternalAuthorizationServiceHelpers include ExternalAuthorizationServiceHelpers
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Profiles::PreferencesController do RSpec.describe Profiles::PreferencesController do
let(:user) { create(:user) } let(:user) { create(:user) }
before do before do
......
# frozen_string_literal: true # frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Projects::AutocompleteSourcesController do RSpec.describe Projects::AutocompleteSourcesController do
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
let_it_be(:group) { create(:group) } let_it_be(:group) { create(:group) }
let_it_be(:group2) { create(:group) } let_it_be(:group2) { create(:group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Projects::BlobController do RSpec.describe Projects::BlobController do
include ProjectForksHelper include ProjectForksHelper
let(:project) { create(:project, :public, :repository) } let(:project) { create(:project, :public, :repository) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Projects::JobsController do RSpec.describe Projects::JobsController do
describe 'GET #show', :clean_gitlab_redis_shared_state do describe 'GET #show', :clean_gitlab_redis_shared_state do
context 'when requesting JSON' do context 'when requesting JSON' do
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Projects::MergeRequests::ContentController do RSpec.describe Projects::MergeRequests::ContentController do
let(:project) { create(:project, :repository) } let(:project) { create(:project, :repository) }
let(:user) { create(:user) } let(:user) { create(:user) }
let(:merge_request) { create(:merge_request, target_project: project, source_project: project) } let(:merge_request) { create(:merge_request, target_project: project, source_project: project) }
......
# frozen_string_literal: true # frozen_string_literal: true
require "spec_helper" require "spec_helper"
describe Projects::ProtectedBranchesController do RSpec.describe Projects::ProtectedBranchesController do
let(:project) { create(:project, :repository) } let(:project) { create(:project, :repository) }
let(:protected_branch) { create(:protected_branch, project: project) } let(:protected_branch) { create(:protected_branch, project: project) }
let(:project_params) { { namespace_id: project.namespace.to_param, project_id: project } } let(:project_params) { { namespace_id: project.namespace.to_param, project_id: project } }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe RootController do RSpec.describe RootController do
include ::EE::GeoHelpers include ::EE::GeoHelpers
describe 'GET #index' do describe 'GET #index' do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe SentNotificationsController do RSpec.describe SentNotificationsController do
let(:user) { create(:user) } let(:user) { create(:user) }
context 'Unsubscribing from an epic' do context 'Unsubscribing from an epic' do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe SessionsController, :geo do RSpec.describe SessionsController, :geo do
include DeviseHelpers include DeviseHelpers
include EE::GeoHelpers include EE::GeoHelpers
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Explore::OnboardingController do RSpec.describe Explore::OnboardingController do
let(:user) { create(:user, username: 'gitlab-org') } let(:user) { create(:user, username: 'gitlab-org') }
before do before do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Groups::Analytics::CycleAnalytics::StagesController do RSpec.describe Groups::Analytics::CycleAnalytics::StagesController do
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
let_it_be(:group, refind: true) { create(:group) } let_it_be(:group, refind: true) { create(:group) }
let(:params) { { group_id: group } } let(:params) { { group_id: group } }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Groups::Analytics::CycleAnalyticsController do RSpec.describe Groups::Analytics::CycleAnalyticsController do
let(:group) { create(:group) } let(:group) { create(:group) }
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Groups::Analytics::ProductivityAnalyticsController do RSpec.describe Groups::Analytics::ProductivityAnalyticsController do
let_it_be(:current_user) { create(:user) } let_it_be(:current_user) { create(:user) }
let_it_be(:group) { create :group } let_it_be(:group) { create :group }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Analytics::TasksByTypeController do RSpec.describe Analytics::TasksByTypeController do
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
let(:group) { create(:group) } let(:group) { create(:group) }
let(:label) { create(:group_label, group: group) } let(:label) { create(:group_label, group: group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Groups::AuditEventsController do RSpec.describe Groups::AuditEventsController do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:owner) { create(:user) } let(:owner) { create(:user) }
let(:group) { create(:group, :private) } let(:group) { create(:group, :private) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Groups::AutocompleteSourcesController do RSpec.describe Groups::AutocompleteSourcesController do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:group) { create(:group, :private) } let(:group) { create(:group, :private) }
let!(:epic) { create(:epic, group: group) } let!(:epic) { create(:epic, group: group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Groups::BillingsController do RSpec.describe Groups::BillingsController do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:group) { create(:group, :private) } let(:group) { create(:group, :private) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Groups::BoardsController do RSpec.describe Groups::BoardsController do
let(:group) { create(:group) } let(:group) { create(:group) }
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Groups::ClustersController do RSpec.describe Groups::ClustersController do
include AccessMatchersForController include AccessMatchersForController
let_it_be(:group) { create(:group) } let_it_be(:group) { create(:group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Groups::ContributionAnalyticsController do RSpec.describe Groups::ContributionAnalyticsController do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:user2) { create(:user) } let(:user2) { create(:user) }
let(:user3) { create(:user) } let(:user3) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Groups::DependencyProxiesController do RSpec.describe Groups::DependencyProxiesController do
let(:group) { create(:group) } let(:group) { create(:group) }
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Groups::DependencyProxyForContainersController do RSpec.describe Groups::DependencyProxyForContainersController do
let(:group) { create(:group) } let(:group) { create(:group) }
let(:token_response) { { status: :success, token: 'abcd1234' } } let(:token_response) { { status: :success, token: 'abcd1234' } }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Groups::EpicIssuesController do RSpec.describe Groups::EpicIssuesController do
let(:group) { create(:group, :public) } let(:group) { create(:group, :public) }
let(:project) { create(:project, group: group) } let(:project) { create(:project, group: group) }
let(:milestone) { create(:milestone, project: project) } let(:milestone) { create(:milestone, project: project) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Groups::EpicLinksController do RSpec.describe Groups::EpicLinksController do
let(:group) { create(:group, :public) } let(:group) { create(:group, :public) }
let(:parent_epic) { create(:epic, group: group) } let(:parent_epic) { create(:epic, group: group) }
let(:epic1) { create(:epic, group: group) } let(:epic1) { create(:epic, group: group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Groups::Epics::NotesController do RSpec.describe Groups::Epics::NotesController do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:group) { create(:group) } let(:group) { create(:group) }
let(:epic) { create(:epic, group: group) } let(:epic) { create(:epic, group: group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Groups::EpicsController do RSpec.describe Groups::EpicsController do
let(:group) { create(:group, :private) } let(:group) { create(:group, :private) }
let(:epic) { create(:epic, group: group) } let(:epic) { create(:epic, group: group) }
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Groups::GroupMembersController do RSpec.describe Groups::GroupMembersController do
include ExternalAuthorizationServiceHelpers include ExternalAuthorizationServiceHelpers
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe GroupsController do RSpec.describe GroupsController do
include ExternalAuthorizationServiceHelpers include ExternalAuthorizationServiceHelpers
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Groups::HooksController do RSpec.describe Groups::HooksController do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:group) { create(:group) } let(:group) { create(:group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Groups::InsightsController do RSpec.describe Groups::InsightsController do
let_it_be(:parent_group) { create(:group, :private) } let_it_be(:parent_group) { create(:group, :private) }
let_it_be(:nested_group) { create(:group, :private, parent: parent_group) } let_it_be(:nested_group) { create(:group, :private, parent: parent_group) }
let_it_be(:project) { create(:project, :private) } let_it_be(:project) { create(:project, :private) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Groups::IssuesAnalyticsController do RSpec.describe Groups::IssuesAnalyticsController do
it_behaves_like 'issues analytics controller' do it_behaves_like 'issues analytics controller' do
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
let_it_be(:group) { create(:group) } let_it_be(:group) { create(:group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Groups::IssuesController do RSpec.describe Groups::IssuesController do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:group) { create(:group, :public) } let(:group) { create(:group, :public) }
let(:project) { create(:project_empty_repo, :public, namespace: group) } let(:project) { create(:project_empty_repo, :public, namespace: group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Groups::LdapSettingsController do RSpec.describe Groups::LdapSettingsController do
include LdapHelpers include LdapHelpers
let(:group) { create(:group) } let(:group) { create(:group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Groups::LdapsController do RSpec.describe Groups::LdapsController do
include LdapHelpers include LdapHelpers
let(:group) { create(:group) } let(:group) { create(:group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Groups::MergeRequestsController do RSpec.describe Groups::MergeRequestsController do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:group) { create(:group, :public) } let(:group) { create(:group, :public) }
let(:project) { create(:project, :repository, group: group) } let(:project) { create(:project, :repository, group: group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Groups::OmniauthCallbacksController do RSpec.describe Groups::OmniauthCallbacksController do
include LoginHelpers include LoginHelpers
include ForgeryProtection include ForgeryProtection
......
# frozen_string_literal: true # frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Groups::PushRulesController do RSpec.describe Groups::PushRulesController do
let_it_be(:group) { create(:group, :private) } let_it_be(:group) { create(:group, :private) }
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
......
# frozen_string_literal: true # frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Groups::RoadmapController do RSpec.describe Groups::RoadmapController do
let(:group) { create(:group, :private) } let(:group) { create(:group, :private) }
let(:epic) { create(:epic, group: group) } let(:epic) { create(:epic, group: group) }
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Groups::SamlProvidersController do RSpec.describe Groups::SamlProvidersController do
let(:saml_provider) { create(:saml_provider, group: group) } let(:saml_provider) { create(:saml_provider, group: group) }
let(:group) { create(:group, :private, parent_id: nil) } let(:group) { create(:group, :private, parent_id: nil) }
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Groups::ScimOauthController do RSpec.describe Groups::ScimOauthController do
let(:saml_provider) { create(:saml_provider, group: group) } let(:saml_provider) { create(:saml_provider, group: group) }
let(:group) { create(:group, :private, parent_id: nil) } let(:group) { create(:group, :private, parent_id: nil) }
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Groups::Security::ComplianceDashboardsController do RSpec.describe Groups::Security::ComplianceDashboardsController do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:group) { create(:group) } let(:group) { create(:group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Groups::Security::CredentialsController do RSpec.describe Groups::Security::CredentialsController do
let_it_be(:group_with_managed_accounts) { create(:group_with_managed_accounts, :private) } let_it_be(:group_with_managed_accounts) { create(:group_with_managed_accounts, :private) }
let_it_be(:managed_users) { create_list(:user, 2, :group_managed, managing_group: group_with_managed_accounts) } let_it_be(:managed_users) { create_list(:user, 2, :group_managed, managing_group: group_with_managed_accounts) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Groups::Security::DashboardController do RSpec.describe Groups::Security::DashboardController do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:group) { create(:group) } let(:group) { create(:group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Groups::Security::VulnerabilityFindingsController do RSpec.describe Groups::Security::VulnerabilityFindingsController do
let(:group) { create(:group) } let(:group) { create(:group) }
let(:sub_group) { create(:group, parent: group) } let(:sub_group) { create(:group, parent: group) }
let(:params) { { group_id: group } } let(:params) { { group_id: group } }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Groups::Security::VulnerableProjectsController do RSpec.describe Groups::Security::VulnerableProjectsController do
let(:group) { create(:group) } let(:group) { create(:group) }
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Groups::SsoController do RSpec.describe Groups::SsoController do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:group) { create(:group, :private, name: 'our-group', saml_discovery_token: 'test-token') } let(:group) { create(:group, :private, name: 'our-group', saml_discovery_token: 'test-token') }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Groups::TodosController do RSpec.describe Groups::TodosController do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:group) { create(:group, :private) } let(:group) { create(:group, :private) }
let(:epic) { create(:epic, group: group) } let(:epic) { create(:epic, group: group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe JiraConnect::AppDescriptorController do RSpec.describe JiraConnect::AppDescriptorController do
describe '#show' do describe '#show' do
it 'returns JSON app descriptor' do it 'returns JSON app descriptor' do
get :show get :show
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe JiraConnect::EventsController do RSpec.describe JiraConnect::EventsController do
describe '#installed' do describe '#installed' do
subject do subject do
post :installed, params: { post :installed, params: {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe JiraConnect::SubscriptionsController do RSpec.describe JiraConnect::SubscriptionsController do
let_it_be(:installation) { create(:jira_connect_installation) } let_it_be(:installation) { create(:jira_connect_installation) }
describe '#index' do describe '#index' do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Ldap::OmniauthCallbacksController do RSpec.describe Ldap::OmniauthCallbacksController do
include_context 'Ldap::OmniauthCallbacksController' include_context 'Ldap::OmniauthCallbacksController'
it "displays LDAP sync flash on first sign in" do it "displays LDAP sync flash on first sign in" do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Oauth::ApplicationsController do RSpec.describe Oauth::ApplicationsController do
let(:user) { create(:user) } let(:user) { create(:user) }
context 'project members' do context 'project members' do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Oauth::GeoAuthController, :geo do RSpec.describe Oauth::GeoAuthController, :geo do
include EE::GeoHelpers include EE::GeoHelpers
# The Geo OAuth workflow depends on the OAuth application and the URL # The Geo OAuth workflow depends on the OAuth application and the URL
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Oauth::Jira::AuthorizationsController do RSpec.describe Oauth::Jira::AuthorizationsController do
describe 'GET new' do describe 'GET new' do
it 'redirects to OAuth authorization with correct params' do it 'redirects to OAuth authorization with correct params' do
get :new, params: { client_id: 'client-123', redirect_uri: 'http://example.com/' } get :new, params: { client_id: 'client-123', redirect_uri: 'http://example.com/' }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe OperationsController do RSpec.describe OperationsController do
include Rails.application.routes.url_helpers include Rails.application.routes.url_helpers
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Profiles::BillingsController do RSpec.describe Profiles::BillingsController do
let(:user) { create(:user) } let(:user) { create(:user) }
describe 'GET #index' do describe 'GET #index' do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Profiles::KeysController do RSpec.describe Profiles::KeysController do
let(:user) { create(:user) } let(:user) { create(:user) }
describe '#create' do describe '#create' do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Profiles::SlacksController do RSpec.describe Profiles::SlacksController do
let(:user) { create(:user) } let(:user) { create(:user) }
before do before do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Profiles::UsageQuotasController do RSpec.describe Profiles::UsageQuotasController do
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
before do before do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require('spec_helper') require('spec_helper')
describe ProfilesController, :request_store do RSpec.describe ProfilesController, :request_store do
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
let_it_be(:admin) { create(:admin) } let_it_be(:admin) { create(:admin) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Projects::Analytics::IssuesAnalyticsController do RSpec.describe Projects::Analytics::IssuesAnalyticsController do
it_behaves_like 'issues analytics controller' do it_behaves_like 'issues analytics controller' do
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
let_it_be(:group) { create(:group) } let_it_be(:group) { create(:group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Projects::ApproverGroupsController do RSpec.describe Projects::ApproverGroupsController do
describe '#destroy' do describe '#destroy' do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project) } let(:project) { create(:project) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Projects::ApproversController do RSpec.describe Projects::ApproversController do
describe '#destroy' do describe '#destroy' do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project) } let(:project) { create(:project) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Projects::AuditEventsController do RSpec.describe Projects::AuditEventsController do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:maintainer) { create(:user) } let(:maintainer) { create(:user) }
let(:project) { create(:project, :private) } let(:project) { create(:project, :private) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Projects::BoardsController do RSpec.describe Projects::BoardsController do
let(:project) { create(:project) } let(:project) { create(:project) }
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Projects::BranchesController do RSpec.describe Projects::BranchesController do
let_it_be(:project) { create(:project, :repository) } let_it_be(:project) { create(:project, :repository) }
let(:user) { project.owner } let(:user) { project.owner }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Projects::ClustersController do RSpec.describe Projects::ClustersController do
let_it_be(:project) { create(:project) } let_it_be(:project) { create(:project) }
it_behaves_like 'cluster metrics' do it_behaves_like 'cluster metrics' do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Projects::DependenciesController do RSpec.describe Projects::DependenciesController do
describe 'GET #index' do describe 'GET #index' do
let_it_be(:developer) { create(:user) } let_it_be(:developer) { create(:user) }
let_it_be(:guest) { create(:user) } let_it_be(:guest) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Projects::DeployKeysController do RSpec.describe Projects::DeployKeysController do
let(:project) { create(:project, :repository) } let(:project) { create(:project, :repository) }
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Projects::EnvironmentsController do RSpec.describe Projects::EnvironmentsController do
include KubernetesHelpers include KubernetesHelpers
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Projects::FeatureFlagsClientsController do RSpec.describe Projects::FeatureFlagsClientsController do
include Gitlab::Routing include Gitlab::Routing
let_it_be(:project) { create(:project) } let_it_be(:project) { create(:project) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Projects::FeatureFlagsController do RSpec.describe Projects::FeatureFlagsController do
include Gitlab::Routing include Gitlab::Routing
include FeatureFlagHelpers include FeatureFlagHelpers
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Projects::FeatureFlagsUserListsController do RSpec.describe Projects::FeatureFlagsUserListsController do
let_it_be(:project) { create(:project) } let_it_be(:project) { create(:project) }
let_it_be(:reporter) { create(:user) } let_it_be(:reporter) { create(:user) }
let_it_be(:developer) { create(:user) } let_it_be(:developer) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Projects::ImportsController do RSpec.describe Projects::ImportsController do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project) } let(:project) { create(:project) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Projects::IssueLinksController do RSpec.describe Projects::IssueLinksController do
let_it_be(:namespace) { create(:group, :public) } let_it_be(:namespace) { create(:group, :public) }
let_it_be(:project) { create(:project, :public, namespace: namespace) } let_it_be(:project) { create(:project, :public, namespace: namespace) }
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Projects::IssuesController do RSpec.describe Projects::IssuesController do
let(:namespace) { create(:group, :public) } let(:namespace) { create(:group, :public) }
let(:project) { create(:project_empty_repo, :public, namespace: namespace) } let(:project) { create(:project_empty_repo, :public, namespace: namespace) }
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Projects::LicensesController do RSpec.describe Projects::LicensesController do
describe "GET #index" do describe "GET #index" do
let_it_be(:project) { create(:project, :repository, :private) } let_it_be(:project) { create(:project, :repository, :private) }
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Projects::MergeRequests::CreationsController do RSpec.describe Projects::MergeRequests::CreationsController do
let(:project) { create(:project, :repository) } let(:project) { create(:project, :repository) }
let(:merge_request) { create(:merge_request_with_diffs, target_project: project, source_project: project) } let(:merge_request) { create(:merge_request_with_diffs, target_project: project, source_project: project) }
let(:user) { project.owner } let(:user) { project.owner }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
shared_examples 'approvals' do RSpec.shared_examples 'approvals' do
let!(:approver) { create(:user) } let!(:approver) { create(:user) }
let!(:approval_rule) { create(:approval_project_rule, project: project, users: [approver, user], approvals_required: 2) } let!(:approval_rule) { create(:approval_project_rule, project: project, users: [approver, user], approvals_required: 2) }
...@@ -90,7 +90,7 @@ shared_examples 'approvals' do ...@@ -90,7 +90,7 @@ shared_examples 'approvals' do
end end
end end
shared_examples 'authorize read pipeline' do RSpec.shared_examples 'authorize read pipeline' do
context 'public project with private builds' do context 'public project with private builds' do
let(:comparison_status) { {} } let(:comparison_status) { {} }
let(:project) { create(:project, :public, :builds_private) } let(:project) { create(:project, :public, :builds_private) }
...@@ -113,7 +113,7 @@ shared_examples 'authorize read pipeline' do ...@@ -113,7 +113,7 @@ shared_examples 'authorize read pipeline' do
end end
end end
describe Projects::MergeRequestsController do RSpec.describe Projects::MergeRequestsController do
include ProjectForksHelper include ProjectForksHelper
let(:project) { create(:project, :repository) } let(:project) { create(:project, :repository) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Projects::MirrorsController do RSpec.describe Projects::MirrorsController do
include ReactiveCachingHelpers include ReactiveCachingHelpers
describe 'setting up a remote mirror' do describe 'setting up a remote mirror' do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Projects::PagesController do RSpec.describe Projects::PagesController do
let(:project) { create(:project) } let(:project) { create(:project) }
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Projects::PathLocksController do RSpec.describe Projects::PathLocksController do
let(:project) { create(:project, :repository, :public) } let(:project) { create(:project, :repository, :public) }
let(:user) { project.owner } let(:user) { project.owner }
let(:file_path) { 'files/lfs/lfs_object.iso' } let(:file_path) { 'files/lfs/lfs_object.iso' }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Projects::PipelinesController do RSpec.describe Projects::PipelinesController do
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
let_it_be(:project) { create(:project, :repository) } let_it_be(:project) { create(:project, :repository) }
let_it_be(:pipeline) { create(:ci_pipeline, project: project, ref: 'master', sha: project.commit.id) } let_it_be(:pipeline) { create(:ci_pipeline, project: project, ref: 'master', sha: project.commit.id) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require('spec_helper') require('spec_helper')
describe Projects::ProjectMembersController do RSpec.describe Projects::ProjectMembersController do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project, :public, namespace: namespace) } let(:project) { create(:project, :public, namespace: namespace) }
let(:namespace) { create :group } let(:namespace) { create :group }
......
# frozen_string_literal: true # frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Projects::ProtectedEnvironmentsController do RSpec.describe Projects::ProtectedEnvironmentsController do
let(:project) { create(:project) } let(:project) { create(:project) }
let(:current_user) { create(:user) } let(:current_user) { create(:user) }
let(:maintainer_access) { Gitlab::Access::MAINTAINER } let(:maintainer_access) { Gitlab::Access::MAINTAINER }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Projects::PushRulesController do RSpec.describe Projects::PushRulesController do
let(:project) { create(:project, push_rule: create(:push_rule, prevent_secrets: false)) } let(:project) { create(:project, push_rule: create(:push_rule, prevent_secrets: false)) }
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require "spec_helper" require "spec_helper"
describe Projects::RepositoriesController do RSpec.describe Projects::RepositoriesController do
let(:project) { create(:project, :repository) } let(:project) { create(:project, :repository) }
describe "GET archive" do describe "GET archive" do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Projects::RequirementsManagement::RequirementsController do RSpec.describe Projects::RequirementsManagement::RequirementsController do
let_it_be(:project) { create(:project) } let_it_be(:project) { create(:project) }
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Projects::Security::ConfigurationController do RSpec.describe Projects::Security::ConfigurationController do
let(:group) { create(:group) } let(:group) { create(:group) }
let(:project) { create(:project, :repository, namespace: group) } let(:project) { create(:project, :repository, namespace: group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Projects::Security::DashboardController do RSpec.describe Projects::Security::DashboardController do
let_it_be(:group) { create(:group) } let_it_be(:group) { create(:group) }
let_it_be(:project) { create(:project, :repository, :public, namespace: group) } let_it_be(:project) { create(:project, :repository, :public, namespace: group) }
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Projects::Security::NetworkPoliciesController do RSpec.describe Projects::Security::NetworkPoliciesController do
let_it_be(:group) { create(:group) } let_it_be(:group) { create(:group) }
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Projects::Security::Vulnerabilities::NotesController do RSpec.describe Projects::Security::Vulnerabilities::NotesController do
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
let_it_be(:project) { create(:project) } let_it_be(:project) { create(:project) }
let_it_be(:vulnerability) { create(:vulnerability, project: project) } let_it_be(:vulnerability) { create(:vulnerability, project: project) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Projects::Security::VulnerabilitiesController do RSpec.describe Projects::Security::VulnerabilitiesController do
let_it_be(:group) { create(:group) } let_it_be(:group) { create(:group) }
let_it_be(:project) { create(:project, :repository, :public, namespace: group) } let_it_be(:project) { create(:project, :repository, :public, namespace: group) }
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Projects::Security::VulnerabilityFindingsController do RSpec.describe Projects::Security::VulnerabilityFindingsController do
let(:project) { create(:project) } let(:project) { create(:project) }
let(:params) { { project_id: project, namespace_id: project.creator } } let(:params) { { project_id: project, namespace_id: project.creator } }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Projects::Security::WafAnomaliesController do RSpec.describe Projects::Security::WafAnomaliesController do
let_it_be(:group) { create(:group) } let_it_be(:group) { create(:group) }
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Projects::ServiceDeskController do RSpec.describe Projects::ServiceDeskController do
let_it_be(:project) do let_it_be(:project) do
create(:project, :private, :custom_repo, service_desk_enabled: true, create(:project, :private, :custom_repo, service_desk_enabled: true,
files: { '.gitlab/issue_templates/service_desk.md' => 'template' }) files: { '.gitlab/issue_templates/service_desk.md' => 'template' })
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Projects::Settings::IntegrationsController do RSpec.describe Projects::Settings::IntegrationsController do
let(:project) { create(:project, :public) } let(:project) { create(:project, :public) }
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Projects::Settings::OperationsController do RSpec.describe Projects::Settings::OperationsController do
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
before do before do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Projects::Settings::RepositoryController do RSpec.describe Projects::Settings::RepositoryController do
let(:project) { create(:project_empty_repo, :public) } let(:project) { create(:project_empty_repo, :public) }
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Projects::Settings::SlacksController do RSpec.describe Projects::Settings::SlacksController do
let(:project) { create(:project, :public) } let(:project) { create(:project, :public) }
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Projects::SubscriptionsController do RSpec.describe Projects::SubscriptionsController do
let(:project) { create(:project) } let(:project) { create(:project) }
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Projects::ThreatMonitoringController do RSpec.describe Projects::ThreatMonitoringController do
let_it_be(:project) { create(:project, :repository, :private) } let_it_be(:project) { create(:project, :repository, :private) }
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Projects::TracingsController do RSpec.describe Projects::TracingsController do
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
describe 'GET show' do describe 'GET show' do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Projects::VulnerabilityFeedbackController do RSpec.describe Projects::VulnerabilityFeedbackController do
let(:group) { create(:group) } let(:group) { create(:group) }
let(:project) { create(:project, :public, namespace: group) } let(:project) { create(:project, :public, namespace: group) }
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe ProjectsController do RSpec.describe ProjectsController do
let(:project) { create(:project) } let(:project) { create(:project) }
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Registrations::GroupsController do RSpec.describe Registrations::GroupsController do
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
describe 'GET #new' do describe 'GET #new' do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Registrations::ProjectsController do RSpec.describe Registrations::ProjectsController do
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
let_it_be(:namespace) { create(:group, path: 'group-path') } let_it_be(:namespace) { create(:group, path: 'group-path') }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe RegistrationsController do RSpec.describe RegistrationsController do
describe '#create' do describe '#create' do
context 'when the user opted-in' do context 'when the user opted-in' do
let(:user_params) { { user: attributes_for(:user, email_opted_in: '1') } } let(:user_params) { { user: attributes_for(:user, email_opted_in: '1') } }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Security::DashboardController do RSpec.describe Security::DashboardController do
describe 'GET #show' do describe 'GET #show' do
it_behaves_like Security::ApplicationController do it_behaves_like Security::ApplicationController do
let(:security_application_controller_child_action) do let(:security_application_controller_child_action) do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Security::ProjectsController do RSpec.describe Security::ProjectsController do
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
let_it_be(:project) { create(:project) } let_it_be(:project) { create(:project) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Subscriptions::GroupsController do RSpec.describe Subscriptions::GroupsController do
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
let_it_be(:group) { create(:group) } let_it_be(:group) { create(:group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe SubscriptionsController do RSpec.describe SubscriptionsController do
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
describe 'GET #new' do describe 'GET #new' do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe SurveyResponsesController do RSpec.describe SurveyResponsesController do
describe 'GET #index' do describe 'GET #index' do
subject { get :index, params: params } subject { get :index, params: params }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe TrialRegistrationsController do RSpec.describe TrialRegistrationsController do
describe '#new' do describe '#new' do
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe TrialsController do RSpec.describe TrialsController do
shared_examples 'an authenticated endpoint' do |verb, action| shared_examples 'an authenticated endpoint' do |verb, action|
it 'redirects to login page' do it 'redirects to login page' do
send(verb, action) send(verb, action)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe UnsubscribesController do RSpec.describe UnsubscribesController do
let!(:user) { create :user, email: 'me@example.com' } let!(:user) { create :user, email: 'me@example.com' }
describe "show" do describe "show" do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe UsernamesController do RSpec.describe UsernamesController do
describe 'GET #suggest' do describe 'GET #suggest' do
context 'namespace does not exist' do context 'namespace does not exist' do
it 'returns JSON with the suggested username' do it 'returns JSON with the suggested username' do
......
# frozen_string_literal: true # frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe 'Analytics (JavaScript fixtures)', :sidekiq_inline do RSpec.describe 'Analytics (JavaScript fixtures)', :sidekiq_inline do
include JavaScriptFixturesHelpers include JavaScriptFixturesHelpers
let(:group) { create(:group)} let(:group) { create(:group)}
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Epics (JavaScript fixtures)' do RSpec.describe 'Epics (JavaScript fixtures)' do
include ApplicationHelper include ApplicationHelper
include JavaScriptFixturesHelpers include JavaScriptFixturesHelpers
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Projects::IssuesController, '(JavaScript fixtures)', type: :controller do RSpec.describe Projects::IssuesController, '(JavaScript fixtures)', type: :controller do
include JavaScriptFixturesHelpers include JavaScriptFixturesHelpers
let(:user) { create(:user, feed_token: 'feedtoken:coldfeed') } let(:user) { create(:user, feed_token: 'feedtoken:coldfeed') }
......
# frozen_string_literal: true # frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Groups::SamlProvidersController, '(JavaScript fixtures)', type: :controller do RSpec.describe Groups::SamlProvidersController, '(JavaScript fixtures)', type: :controller do
include JavaScriptFixturesHelpers include JavaScriptFixturesHelpers
let(:group) { create(:group, :private) } let(:group) { create(:group, :private) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe CiMinutesUsageMailer do RSpec.describe CiMinutesUsageMailer do
include EmailSpec::Matchers include EmailSpec::Matchers
let(:namespace) { create(:group) } let(:namespace) { create(:group) }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
require 'spec_helper' require 'spec_helper'
require 'email_spec' require 'email_spec'
describe DeviseMailer do RSpec.describe DeviseMailer do
describe "#confirmation_instructions" do describe "#confirmation_instructions" do
let(:unsaved_user) { create(:user, name: 'Jane Doe', email: 'jdoe@example.com') } let(:unsaved_user) { create(:user, name: 'Jane Doe', email: 'jdoe@example.com') }
let(:custom_text) { 'this is some additional custom text' } let(:custom_text) { 'this is some additional custom text' }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
require 'spec_helper' require 'spec_helper'
require 'email_spec' require 'email_spec'
describe Emails::Issues do RSpec.describe Emails::Issues do
include EmailSpec::Matchers include EmailSpec::Matchers
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
require 'spec_helper' require 'spec_helper'
require 'email_spec' require 'email_spec'
describe EE::Emails::MergeRequests do RSpec.describe EE::Emails::MergeRequests do
include EmailSpec::Matchers include EmailSpec::Matchers
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
require 'spec_helper' require 'spec_helper'
require 'email_spec' require 'email_spec'
describe EE::Emails::Profile do RSpec.describe EE::Emails::Profile do
include EmailSpec::Matchers include EmailSpec::Matchers
describe '#policy_revoked_personal_access_tokens_email' do describe '#policy_revoked_personal_access_tokens_email' do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Emails::AdminNotification do RSpec.describe Emails::AdminNotification do
it 'adds email methods to Notify' do it 'adds email methods to Notify' do
subject.instance_methods.each do |email_method| subject.instance_methods.each do |email_method|
expect(Notify).to be_respond_to(email_method) expect(Notify).to be_respond_to(email_method)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Emails::Epics do RSpec.describe Emails::Epics do
it 'adds email methods to Notify' do it 'adds email methods to Notify' do
subject.instance_methods.each do |email_method| subject.instance_methods.each do |email_method|
expect(Notify).to be_respond_to(email_method) expect(Notify).to be_respond_to(email_method)
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
require 'spec_helper' require 'spec_helper'
require 'email_spec' require 'email_spec'
describe Emails::ServiceDesk do RSpec.describe Emails::ServiceDesk do
include EmailSpec::Helpers include EmailSpec::Helpers
include EmailSpec::Matchers include EmailSpec::Matchers
include EmailHelpers include EmailHelpers
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
require 'spec_helper' require 'spec_helper'
require 'email_spec' require 'email_spec'
describe Notify do RSpec.describe Notify do
include EmailSpec::Helpers include EmailSpec::Helpers
include EmailSpec::Matchers include EmailSpec::Matchers
include EmailHelpers include EmailHelpers
......
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