Commit 7afb0295 authored by Rémy Coutable's avatar Rémy Coutable

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

[RUN AS-IF-FOSS] RSpec zero monkey patching mode

See merge request gitlab-org/gitlab!35058
parents 3632af7f 8722fb64
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe DesignManagement::GenerateImageVersionsService do RSpec.describe DesignManagement::GenerateImageVersionsService do
let_it_be(:project) { create(:project) } let_it_be(:project) { create(:project) }
let_it_be(:issue) { create(:issue, project: project) } let_it_be(:issue) { create(:issue, project: project) }
let_it_be(:version) { create(:design, :with_lfs_file, issue: issue).versions.first } let_it_be(:version) { create(:design, :with_lfs_file, issue: issue).versions.first }
......
# frozen_string_literal: true # frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe DesignManagement::SaveDesignsService do RSpec.describe DesignManagement::SaveDesignsService do
include DesignManagementTestHelpers include DesignManagementTestHelpers
include ConcurrentHelpers include ConcurrentHelpers
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Discussions::CaptureDiffNotePositionService do RSpec.describe Discussions::CaptureDiffNotePositionService do
subject { described_class.new(note.noteable, paths) } subject { described_class.new(note.noteable, paths) }
context 'image note on diff' do context 'image note on diff' do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Discussions::CaptureDiffNotePositionsService do RSpec.describe Discussions::CaptureDiffNotePositionsService do
context 'when merge request has a discussion' do context 'when merge request has a discussion' do
let(:source_branch) { 'compare-with-merge-head-source' } let(:source_branch) { 'compare-with-merge-head-source' }
let(:target_branch) { 'compare-with-merge-head-target' } let(:target_branch) { 'compare-with-merge-head-target' }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Discussions::ResolveService do RSpec.describe Discussions::ResolveService do
describe '#execute' do describe '#execute' do
let_it_be(:project) { create(:project, :repository) } let_it_be(:project) { create(:project, :repository) }
let_it_be(:user) { create(:user, developer_projects: [project]) } let_it_be(:user) { create(:user, developer_projects: [project]) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Discussions::UpdateDiffPositionService do RSpec.describe Discussions::UpdateDiffPositionService do
let(:project) { create(:project, :repository) } let(:project) { create(:project, :repository) }
let(:current_user) { project.owner } let(:current_user) { project.owner }
let(:create_commit) { project.commit("913c66a37b4a45b9769037c55c2d238bd0942d2e") } let(:create_commit) { project.commit("913c66a37b4a45b9769037c55c2d238bd0942d2e") }
......
# frozen_string_literal: true # frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe DraftNotes::CreateService do RSpec.describe DraftNotes::CreateService do
let(:merge_request) { create(:merge_request) } let(:merge_request) { create(:merge_request) }
let(:project) { merge_request.target_project } let(:project) { merge_request.target_project }
let(:user) { merge_request.author } let(:user) { merge_request.author }
......
# frozen_string_literal: true # frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe DraftNotes::DestroyService do RSpec.describe DraftNotes::DestroyService do
let(:merge_request) { create(:merge_request) } let(:merge_request) { create(:merge_request) }
let(:project) { merge_request.target_project } let(:project) { merge_request.target_project }
let(:user) { merge_request.author } let(:user) { merge_request.author }
......
# frozen_string_literal: true # frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe DraftNotes::PublishService do RSpec.describe DraftNotes::PublishService do
include RepoHelpers include RepoHelpers
let(:merge_request) { create(:merge_request) } let(:merge_request) { create(:merge_request) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Emails::ConfirmService do RSpec.describe Emails::ConfirmService do
let(:user) { create(:user) } let(:user) { create(:user) }
subject(:service) { described_class.new(user) } subject(:service) { described_class.new(user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Emails::CreateService do RSpec.describe Emails::CreateService do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:opts) { { email: 'new@email.com', user: user } } let(:opts) { { email: 'new@email.com', user: user } }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Emails::DestroyService do RSpec.describe Emails::DestroyService do
let!(:user) { create(:user) } let!(:user) { create(:user) }
let!(:email) { create(:email, user: user) } let!(:email) { create(:email, user: user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Environments::AutoStopService, :clean_gitlab_redis_shared_state do RSpec.describe Environments::AutoStopService, :clean_gitlab_redis_shared_state do
include CreateEnvironmentsHelpers include CreateEnvironmentsHelpers
include ExclusiveLeaseHelpers include ExclusiveLeaseHelpers
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Environments::ResetAutoStopService do RSpec.describe Environments::ResetAutoStopService do
let_it_be(:project) { create(:project) } let_it_be(:project) { create(:project) }
let_it_be(:developer) { create(:user).tap { |user| project.add_developer(user) } } let_it_be(:developer) { create(:user).tap { |user| project.add_developer(user) } }
let_it_be(:reporter) { create(:user).tap { |user| project.add_reporter(user) } } let_it_be(:reporter) { create(:user).tap { |user| project.add_reporter(user) } }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe ErrorTracking::BaseService do RSpec.describe ErrorTracking::BaseService do
describe '#compose_response' do describe '#compose_response' do
let(:project) { double('project') } let(:project) { double('project') }
let(:user) { double('user') } let(:user) { double('user') }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe ErrorTracking::IssueDetailsService do RSpec.describe ErrorTracking::IssueDetailsService do
include_context 'sentry error tracking context' include_context 'sentry error tracking context'
subject { described_class.new(project, user, params) } subject { described_class.new(project, user, params) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe ErrorTracking::IssueLatestEventService do RSpec.describe ErrorTracking::IssueLatestEventService do
include_context 'sentry error tracking context' include_context 'sentry error tracking context'
subject { described_class.new(project, user) } subject { described_class.new(project, user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe ErrorTracking::IssueUpdateService do RSpec.describe ErrorTracking::IssueUpdateService do
include_context 'sentry error tracking context' include_context 'sentry error tracking context'
let(:arguments) { { issue_id: non_existing_record_id, status: 'resolved' } } let(:arguments) { { issue_id: non_existing_record_id, status: 'resolved' } }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe ErrorTracking::ListIssuesService do RSpec.describe ErrorTracking::ListIssuesService do
include_context 'sentry error tracking context' include_context 'sentry error tracking context'
let(:params) { { search_term: 'something', sort: 'last_seen', cursor: 'some-cursor' } } let(:params) { { search_term: 'something', sort: 'last_seen', cursor: 'some-cursor' } }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe ErrorTracking::ListProjectsService do RSpec.describe ErrorTracking::ListProjectsService do
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
let_it_be(:project, reload: true) { create(:project) } let_it_be(:project, reload: true) { create(:project) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe EventCreateService do RSpec.describe EventCreateService do
let(:service) { described_class.new } let(:service) { described_class.new }
let_it_be(:user, reload: true) { create :user } let_it_be(:user, reload: true) { create :user }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Events::RenderService do RSpec.describe Events::RenderService do
describe '#execute' do describe '#execute' do
let!(:note) { build(:note) } let!(:note) { build(:note) }
let!(:event) { build(:event, target: note, project: note.project) } let!(:event) { build(:event, target: note, project: note.project) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require "spec_helper" require "spec_helper"
describe Files::CreateService do RSpec.describe Files::CreateService do
let(:project) { create(:project, :repository) } let(:project) { create(:project, :repository) }
let(:repository) { project.repository } let(:repository) { project.repository }
let(:user) { create(:user, :commit_email) } let(:user) { create(:user, :commit_email) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require "spec_helper" require "spec_helper"
describe Files::DeleteService do RSpec.describe Files::DeleteService do
subject { described_class.new(project, user, commit_params) } subject { described_class.new(project, user, commit_params) }
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 Files::MultiService do RSpec.describe Files::MultiService do
subject { described_class.new(project, user, commit_params) } subject { described_class.new(project, user, commit_params) }
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 Files::UpdateService do RSpec.describe Files::UpdateService do
subject { described_class.new(project, user, commit_params) } subject { described_class.new(project, user, commit_params) }
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 Git::BaseHooksService do RSpec.describe Git::BaseHooksService do
include RepoHelpers include RepoHelpers
include GitHelpers include GitHelpers
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Git::BranchHooksService do RSpec.describe Git::BranchHooksService do
include RepoHelpers include RepoHelpers
include ProjectForksHelper include ProjectForksHelper
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Git::BranchPushService, services: true do RSpec.describe Git::BranchPushService, services: true do
include RepoHelpers include RepoHelpers
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 Git::ProcessRefChangesService do RSpec.describe Git::ProcessRefChangesService do
let(:project) { create(:project, :repository) } let(:project) { create(:project, :repository) }
let(:user) { project.owner } let(:user) { project.owner }
let(:params) { { changes: git_changes } } let(:params) { { changes: git_changes } }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Git::TagHooksService, :service do RSpec.describe Git::TagHooksService, :service do
let(:user) { create(:user) } let(:user) { create(:user) }
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 Git::TagPushService do RSpec.describe Git::TagPushService do
include RepoHelpers include RepoHelpers
include GitHelpers include GitHelpers
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Git::WikiPushService::Change do RSpec.describe Git::WikiPushService::Change do
subject { described_class.new(project_wiki, change, raw_change) } subject { described_class.new(project_wiki, change, raw_change) }
let(:project_wiki) { double('ProjectWiki') } let(:project_wiki) { double('ProjectWiki') }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Git::WikiPushService, services: true do RSpec.describe Git::WikiPushService, services: true do
include RepoHelpers include RepoHelpers
let_it_be(:key_id) { create(:key, user: current_user).shell_id } let_it_be(:key_id) { create(:key, user: current_user).shell_id }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe GpgKeys::CreateService do RSpec.describe GpgKeys::CreateService do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:params) { attributes_for(:gpg_key) } let(:params) { attributes_for(:gpg_key) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Grafana::ProxyService do RSpec.describe Grafana::ProxyService do
include ReactiveCachingHelpers include ReactiveCachingHelpers
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 GravatarService do RSpec.describe GravatarService do
describe '#execute' do describe '#execute' do
let(:url) { 'http://example.com/avatar?hash=%{hash}&size=%{size}&email=%{email}&username=%{username}' } let(:url) { 'http://example.com/avatar?hash=%{hash}&size=%{size}&email=%{email}&username=%{username}' }
......
# frozen_string_literal: true # frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Groups::AutoDevopsService, '#execute' do RSpec.describe Groups::AutoDevopsService, '#execute' 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) }
let(:group_params) { { auto_devops_enabled: '0' } } let(:group_params) { { auto_devops_enabled: '0' } }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Groups::CreateService, '#execute' do RSpec.describe Groups::CreateService, '#execute' do
let!(:user) { create(:user) } let!(:user) { create(:user) }
let!(:group_params) { { path: "group_path", visibility_level: Gitlab::VisibilityLevel::PUBLIC } } let!(:group_params) { { path: "group_path", visibility_level: Gitlab::VisibilityLevel::PUBLIC } }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Groups::DeployTokens::CreateService do RSpec.describe Groups::DeployTokens::CreateService do
it_behaves_like 'a deploy token creation service' do it_behaves_like 'a deploy token creation service' do
let(:entity) { create(:group) } let(:entity) { create(:group) }
let(:deploy_token_class) { GroupDeployToken } let(:deploy_token_class) { GroupDeployToken }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Groups::DeployTokens::DestroyService do RSpec.describe Groups::DeployTokens::DestroyService do
it_behaves_like 'a deploy token deletion service' do it_behaves_like 'a deploy token deletion service' do
let_it_be(:entity) { create(:group) } let_it_be(:entity) { create(:group) }
let_it_be(:deploy_token_class) { GroupDeployToken } let_it_be(:deploy_token_class) { GroupDeployToken }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Groups::DestroyService do RSpec.describe Groups::DestroyService do
include DatabaseConnectionHelpers include DatabaseConnectionHelpers
let!(:user) { create(:user) } let!(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Groups::GroupLinks::CreateService, '#execute' do RSpec.describe Groups::GroupLinks::CreateService, '#execute' do
let(:parent_group_user) { create(:user) } let(:parent_group_user) { create(:user) }
let(:group_user) { create(:user) } let(:group_user) { create(:user) }
let(:child_group_user) { create(:user) } let(:child_group_user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Groups::GroupLinks::DestroyService, '#execute' do RSpec.describe Groups::GroupLinks::DestroyService, '#execute' do
let(:user) { create(:user) } let(:user) { create(:user) }
let_it_be(:group) { create(:group, :private) } let_it_be(:group) { create(:group, :private) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Groups::GroupLinks::UpdateService, '#execute' do RSpec.describe Groups::GroupLinks::UpdateService, '#execute' do
let(:user) { create(:user) } let(:user) { create(:user) }
let_it_be(:group) { create(:group, :private) } let_it_be(:group) { create(:group, :private) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Groups::ImportExport::ExportService do RSpec.describe Groups::ImportExport::ExportService do
describe '#async_execute' do describe '#async_execute' 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::ImportExport::ImportService do RSpec.describe Groups::ImportExport::ImportService do
describe '#async_execute' do describe '#async_execute' 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::NestedCreateService do RSpec.describe Groups::NestedCreateService do
let(:user) { create(:user) } let(:user) { create(:user) }
subject(:service) { described_class.new(user, params) } subject(:service) { described_class.new(user, params) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Groups::TransferService do RSpec.describe Groups::TransferService do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:new_parent_group) { create(:group, :public) } let(:new_parent_group) { create(:group, :public) }
let!(:group_member) { create(:group_member, :owner, group: group, user: user) } let!(:group_member) { create(:group_member, :owner, group: group, user: user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Groups::UpdateService do RSpec.describe Groups::UpdateService do
let!(:user) { create(:user) } let!(:user) { create(:user) }
let!(:private_group) { create(:group, :private) } let!(:private_group) { create(:group, :private) }
let!(:internal_group) { create(:group, :internal) } let!(:internal_group) { create(:group, :internal) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Import::GithubService do RSpec.describe Import::GithubService do
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
let_it_be(:token) { 'complex-token' } let_it_be(:token) { 'complex-token' }
let_it_be(:access_params) { { github_access_token: 'github-complex-token' } } let_it_be(:access_params) { { github_access_token: 'github-complex-token' } }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe ImportExportCleanUpService do RSpec.describe ImportExportCleanUpService do
describe '#execute' do describe '#execute' do
let(:service) { described_class.new } let(:service) { described_class.new }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe IncidentManagement::CreateIssueService do RSpec.describe IncidentManagement::CreateIssueService do
let(:project) { create(:project, :repository, :private) } let(:project) { create(:project, :repository, :private) }
let_it_be(:user) { User.alert_bot } let_it_be(:user) { User.alert_bot }
let(:service) { described_class.new(project, alert_payload) } let(:service) { described_class.new(project, alert_payload) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Issuable::BulkUpdateService do RSpec.describe Issuable::BulkUpdateService do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project, :repository, namespace: user.namespace) } let(:project) { create(:project, :repository, namespace: user.namespace) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Issuable::Clone::AttributesRewriter do RSpec.describe Issuable::Clone::AttributesRewriter do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:group) { create(:group) } let(:group) { create(:group) }
let(:project1) { create(:project, :public, group: group) } let(:project1) { create(:project, :public, group: group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Issuable::Clone::ContentRewriter do RSpec.describe Issuable::Clone::ContentRewriter do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:group) { create(:group) } let(:group) { create(:group) }
let(:project1) { create(:project, :public, group: group) } let(:project1) { create(:project, :public, group: group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Issuable::CommonSystemNotesService do RSpec.describe Issuable::CommonSystemNotesService 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 Issuable::DestroyService do RSpec.describe Issuable::DestroyService do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project, :public) } let(:project) { create(:project, :public) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper.rb' require 'spec_helper.rb'
describe Issues::BuildService do RSpec.describe Issues::BuildService 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 Issues::CloseService do RSpec.describe Issues::CloseService do
let(:project) { create(:project, :repository) } let(:project) { create(:project, :repository) }
let(:user) { create(:user, email: "user@example.com") } let(:user) { create(:user, email: "user@example.com") }
let(:user2) { create(:user, email: "user2@example.com") } let(:user2) { create(:user, email: "user2@example.com") }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Issues::CreateService do RSpec.describe Issues::CreateService 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 Issues::DuplicateService do RSpec.describe Issues::DuplicateService do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:canonical_project) { create(:project) } let(:canonical_project) { create(:project) }
let(:duplicate_project) { create(:project) } let(:duplicate_project) { create(:project) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Issues::ExportCsvService do RSpec.describe Issues::ExportCsvService do
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
let(:group) { create(:group) } let(:group) { create(:group) }
let(:project) { create(:project, :public, group: group) } let(:project) { create(:project, :public, group: group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Issues::ImportCsvService do RSpec.describe Issues::ImportCsvService 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 Issues::MoveService do RSpec.describe Issues::MoveService do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:author) { create(:user) } let(:author) { create(:user) }
let(:title) { 'Some issue' } let(:title) { 'Some issue' }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper.rb' require 'spec_helper.rb'
describe Issues::ReferencedMergeRequestsService do RSpec.describe Issues::ReferencedMergeRequestsService do
def create_referencing_mr(attributes = {}) def create_referencing_mr(attributes = {})
create(:merge_request, attributes).tap do |merge_request| create(:merge_request, attributes).tap do |merge_request|
create(:note, :system, project: project, noteable: issue, author: user, note: merge_request.to_reference(full: true)) create(:note, :system, project: project, noteable: issue, author: user, note: merge_request.to_reference(full: true))
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Issues::RelatedBranchesService do RSpec.describe Issues::RelatedBranchesService do
let_it_be(:developer) { create(:user) } let_it_be(:developer) { create(:user) }
let_it_be(:issue) { create(:issue) } let_it_be(:issue) { create(:issue) }
let(:user) { developer } let(:user) { developer }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Issues::ReopenService do RSpec.describe Issues::ReopenService do
let(:project) { create(:project) } let(:project) { create(:project) }
let(:issue) { create(:issue, :closed, project: project) } let(:issue) { create(:issue, :closed, project: project) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Issues::ReorderService do RSpec.describe Issues::ReorderService 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(:group) { create(:group) } let_it_be(:group) { create(:group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper.rb' require 'spec_helper.rb'
describe Issues::ResolveDiscussions do RSpec.describe Issues::ResolveDiscussions 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 Issues::UpdateService, :mailer do RSpec.describe Issues::UpdateService, :mailer do
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
let_it_be(:user2) { create(:user) } let_it_be(:user2) { create(:user) }
let_it_be(:user3) { create(:user) } let_it_be(:user3) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Issues::ZoomLinkService do RSpec.describe Issues::ZoomLinkService do
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
let_it_be(:issue) { create(:issue) } let_it_be(:issue) { create(:issue) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Jira::Requests::Projects do RSpec.describe Jira::Requests::Projects do
let(:jira_service) { create(:jira_service) } let(:jira_service) { create(:jira_service) }
let(:params) { {} } let(:params) { {} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe JiraImport::StartImportService do RSpec.describe JiraImport::StartImportService do
include JiraServiceHelper include JiraServiceHelper
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 JiraImport::UsersImporter do RSpec.describe JiraImport::UsersImporter do
include JiraServiceHelper include JiraServiceHelper
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 JiraImport::UsersMapper do RSpec.describe JiraImport::UsersMapper do
let_it_be(:project) { create(:project) } let_it_be(:project) { create(:project) }
subject { described_class.new(project, jira_users).execute } subject { described_class.new(project, jira_users).execute }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Keys::CreateService do RSpec.describe Keys::CreateService do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:params) { attributes_for(:key) } let(:params) { attributes_for(:key) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Keys::DestroyService do RSpec.describe Keys::DestroyService do
let(:user) { create(:user) } let(:user) { create(:user) }
subject { described_class.new(user) } subject { described_class.new(user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Keys::LastUsedService do RSpec.describe Keys::LastUsedService do
describe '#execute', :clean_gitlab_redis_shared_state do describe '#execute', :clean_gitlab_redis_shared_state do
it 'updates the key when it has not been used recently' do it 'updates the key when it has not been used recently' do
key = create(:key, last_used_at: 1.year.ago) key = create(:key, last_used_at: 1.year.ago)
......
# frozen_string_literal: true # frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Labels::AvailableLabelsService do RSpec.describe Labels::AvailableLabelsService do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project, :public, group: group) } let(:project) { create(:project, :public, group: group) }
let(:group) { create(:group) } let(:group) { create(:group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Labels::CreateService do RSpec.describe Labels::CreateService do
describe '#execute' do describe '#execute' do
let(:project) { create(:project) } let(:project) { create(:project) }
let(:group) { create(:group) } let(:group) { create(:group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Labels::FindOrCreateService do RSpec.describe Labels::FindOrCreateService do
describe '#execute' do describe '#execute' do
let(:group) { create(:group) } let(:group) { create(:group) }
let(:project) { create(:project, namespace: group) } let(:project) { create(:project, namespace: group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Labels::PromoteService do RSpec.describe Labels::PromoteService do
describe '#execute' do describe '#execute' do
let!(:user) { create(:user) } let!(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Labels::TransferService do RSpec.describe Labels::TransferService do
describe '#execute' do describe '#execute' do
let_it_be(:user) { create(:admin) } let_it_be(:user) { create(:admin) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Labels::UpdateService do RSpec.describe Labels::UpdateService do
describe '#execute' do describe '#execute' do
let(:project) { create(:project) } let(:project) { create(:project) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require "spec_helper" require "spec_helper"
describe Lfs::FileTransformer do RSpec.describe Lfs::FileTransformer do
let(:project) { create(:project, :repository, :wiki_repo) } let(:project) { create(:project, :repository, :wiki_repo) }
let(:repository) { project.repository } let(:repository) { project.repository }
let(:file_content) { 'Test file content' } let(:file_content) { 'Test file content' }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Lfs::LockFileService do RSpec.describe Lfs::LockFileService do
let(:project) { create(:project) } let(:project) { create(:project) }
let(:current_user) { create(:user) } let(:current_user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Lfs::LocksFinderService do RSpec.describe Lfs::LocksFinderService do
let(:project) { create(:project) } let(:project) { create(:project) }
let(:user) { create(:user) } let(:user) { create(:user) }
let(:params) { {} } let(:params) { {} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Lfs::UnlockFileService do RSpec.describe Lfs::UnlockFileService do
let(:project) { create(:project) } let(:project) { create(:project) }
let(:current_user) { create(:user) } let(:current_user) { create(:user) }
let(:lock_author) { create(:user) } let(:lock_author) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Members::ApproveAccessRequestService do RSpec.describe Members::ApproveAccessRequestService do
let(:project) { create(:project, :public) } let(:project) { create(:project, :public) }
let(:group) { create(:group, :public) } let(:group) { create(:group, :public) }
let(:current_user) { create(:user) } let(:current_user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Members::CreateService do RSpec.describe Members::CreateService do
let(:project) { create(:project) } let(:project) { create(:project) }
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project_user) { create(:user) } let(:project_user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Members::DestroyService do RSpec.describe Members::DestroyService do
let(:current_user) { create(:user) } let(:current_user) { create(:user) }
let(:member_user) { create(:user) } let(:member_user) { create(:user) }
let(:group) { create(:group, :public) } let(:group) { create(:group, :public) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Members::RequestAccessService do RSpec.describe Members::RequestAccessService do
let(:user) { create(:user) } let(:user) { create(:user) }
shared_examples 'a service raising Gitlab::Access::AccessDeniedError' do shared_examples 'a service raising Gitlab::Access::AccessDeniedError' do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Members::UpdateService do RSpec.describe Members::UpdateService do
let(:project) { create(:project, :public) } let(:project) { create(:project, :public) }
let(:group) { create(:group, :public) } let(:group) { create(:group, :public) }
let(:current_user) { create(:user) } let(:current_user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe MergeRequests::AddContextService do RSpec.describe MergeRequests::AddContextService do
let(:project) { create(:project, :repository) } let(:project) { create(:project, :repository) }
let(:admin) { create(:admin) } let(:admin) { create(:admin) }
let(:merge_request) { create(:merge_request, source_project: project, target_project: project, author: admin) } let(:merge_request) { create(:merge_request, source_project: project, target_project: project, author: admin) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe MergeRequests::AddTodoWhenBuildFailsService do RSpec.describe MergeRequests::AddTodoWhenBuildFailsService do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project, :repository) } let(:project) { create(:project, :repository) }
let(:sha) { '1234567890abcdef1234567890abcdef12345678' } let(:sha) { '1234567890abcdef1234567890abcdef12345678' }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe MergeRequests::AfterCreateService do RSpec.describe MergeRequests::AfterCreateService do
let_it_be(:merge_request) { create(:merge_request) } let_it_be(:merge_request) { create(:merge_request) }
subject(:after_create_service) do subject(:after_create_service) do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe MergeRequests::AssignIssuesService do RSpec.describe MergeRequests::AssignIssuesService do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project, :public, :repository) } let(:project) { create(:project, :public, :repository) }
let(:issue) { create(:issue, project: project) } let(:issue) { create(:issue, project: project) }
......
# frozen_string_literal: true # frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe MergeRequests::BuildService do RSpec.describe MergeRequests::BuildService do
using RSpec::Parameterized::TableSyntax using RSpec::Parameterized::TableSyntax
include RepoHelpers include RepoHelpers
include ProjectForksHelper include ProjectForksHelper
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe MergeRequests::CloseService do RSpec.describe MergeRequests::CloseService do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:user2) { create(:user) } let(:user2) { create(:user) }
let(:guest) { create(:user) } let(:guest) { create(:user) }
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment