Commit 34b6fe75 authored by Sean McGivern's avatar Sean McGivern

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

RSpec zero monkey patching mode

See merge request gitlab-org/gitlab!33739
parents 619b7728 96f55927
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Pipeline Schedules', :js do RSpec.describe 'Pipeline Schedules', :js do
include PipelineSchedulesHelper include PipelineSchedulesHelper
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 'Pipeline', :js do RSpec.describe 'Pipeline', :js do
include RoutesHelpers include RoutesHelpers
include ProjectForksHelper include ProjectForksHelper
include ::ExclusiveLeaseHelpers include ::ExclusiveLeaseHelpers
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Pipelines', :js do RSpec.describe 'Pipelines', :js do
include ProjectForksHelper include ProjectForksHelper
let(:project) { create(:project) } let(:project) { create(:project) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Projects > Raw > User interacts with raw endpoint' do RSpec.describe 'Projects > Raw > User interacts with raw endpoint' do
include RepoHelpers include RepoHelpers
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'User edits Release', :js do RSpec.describe 'User edits Release', :js do
let_it_be(:project) { create(:project, :repository) } let_it_be(:project) { create(:project, :repository) }
let_it_be(:release) { create(:release, project: project, name: 'The first release' ) } let_it_be(:release) { create(:release, project: project, name: 'The first release' ) }
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 'User views Release', :js do RSpec.describe 'User views Release', :js do
let(:project) { create(:project, :repository) } let(:project) { create(:project, :repository) }
let(:release) { create(:release, project: project, name: 'The first release' ) } let(:release) { create(:release, project: project, name: 'The first release' ) }
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'User views releases', :js do RSpec.describe 'User views releases', :js do
let_it_be(:project) { create(:project, :repository, :private) } let_it_be(:project) { create(:project, :repository, :private) }
let_it_be(:release) { create(:release, project: project, name: 'The first release' ) } let_it_be(:release) { create(:release, project: project, name: 'The first release' ) }
let_it_be(:maintainer) { create(:user) } let_it_be(:maintainer) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Project remote mirror', :feature do RSpec.describe 'Project remote mirror', :feature do
let(:project) { create(:project, :repository, :remote_mirror) } let(:project) { create(:project, :repository, :remote_mirror) }
let(:remote_mirror) { project.remote_mirrors.first } let(:remote_mirror) { project.remote_mirrors.first }
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Functions', :js do RSpec.describe 'Functions', :js do
include KubernetesHelpers include KubernetesHelpers
include ReactiveCachingHelpers include ReactiveCachingHelpers
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Disable individual triggers' do RSpec.describe 'Disable individual triggers' do
include_context 'project service activation' include_context 'project service activation'
let(:checkbox_selector) { 'input[type=checkbox][id$=_events]' } let(:checkbox_selector) { 'input[type=checkbox][id$=_events]' }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Prometheus external alerts', :js do RSpec.describe 'Prometheus external alerts', :js do
include_context 'project service activation' include_context 'project service activation'
let(:alerts_section_selector) { '.js-prometheus-alerts' } let(:alerts_section_selector) { '.js-prometheus-alerts' }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'User activates Alerts', :js do RSpec.describe 'User activates Alerts', :js 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 'User activates Asana' do RSpec.describe 'User activates Asana' do
include_context 'project service activation' include_context 'project service activation'
it 'activates service', :js do it 'activates service', :js do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'User activates Assembla' do RSpec.describe 'User activates Assembla' do
include_context 'project service activation' include_context 'project service activation'
before do before do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'User activates Atlassian Bamboo CI' do RSpec.describe 'User activates Atlassian Bamboo CI' do
include_context 'project service activation' include_context 'project service activation'
before do before do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'User activates Emails on push' do RSpec.describe 'User activates Emails on push' do
include_context 'project service activation' include_context 'project service activation'
it 'activates service', :js do it 'activates service', :js do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'User activates Flowdock' do RSpec.describe 'User activates Flowdock' do
include_context 'project service activation' do include_context 'project service activation' do
let(:project) { create(:project, :repository) } let(:project) { create(:project, :repository) }
end end
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'User activates HipChat', :js do RSpec.describe 'User activates HipChat', :js do
include_context 'project service activation' include_context 'project service activation'
context 'with standart settings' do context 'with standart settings' do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'User activates Irker (IRC gateway)' do RSpec.describe 'User activates Irker (IRC gateway)' do
include_context 'project service activation' include_context 'project service activation'
it 'activates service', :js do it 'activates service', :js do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'User activates issue tracker', :js do RSpec.describe 'User activates issue tracker', :js do
include_context 'project service activation' include_context 'project service activation'
let(:url) { 'http://tracker.example.com' } let(:url) { 'http://tracker.example.com' }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'User activates JetBrains TeamCity CI' do RSpec.describe 'User activates JetBrains TeamCity CI' do
include_context 'project service activation' include_context 'project service activation'
before do before do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'User activates Jira', :js do RSpec.describe 'User activates Jira', :js do
include_context 'project service activation' include_context 'project service activation'
let(:url) { 'http://jira.example.com' } let(:url) { 'http://jira.example.com' }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Set up Mattermost slash commands', :js do RSpec.describe 'Set up Mattermost slash commands', :js do
describe 'user visits the mattermost slash command config page' do describe 'user visits the mattermost slash command config page' do
include_context 'project service activation' include_context 'project service activation'
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'User activates Packagist' do RSpec.describe 'User activates Packagist' do
include_context 'project service activation' include_context 'project service activation'
before do before do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'User activates PivotalTracker' do RSpec.describe 'User activates PivotalTracker' do
include_context 'project service activation' include_context 'project service activation'
before do before do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'User activates Prometheus' do RSpec.describe 'User activates Prometheus' do
include_context 'project service activation' include_context 'project service activation'
before do before do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'User activates Pushover' do RSpec.describe 'User activates Pushover' do
include_context 'project service activation' include_context 'project service activation'
before do before do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'User activates Slack notifications' do RSpec.describe 'User activates Slack notifications' do
include_context 'project service activation' include_context 'project service activation'
context 'when service is not configured yet' do context 'when service is not configured yet' do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Slack slash commands' do RSpec.describe 'Slack slash commands' do
include_context 'project service activation' include_context 'project service activation'
before do before do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'User views services' do RSpec.describe 'User views services' do
include_context 'project service activation' include_context 'project service activation'
it 'shows the list of available services' do it 'shows the list of available services' do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Project > Settings > Access Tokens', :js do RSpec.describe 'Project > Settings > Access Tokens', :js do
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
let_it_be(:bot_user) { create(:user, :project_bot) } let_it_be(:bot_user) { create(:user, :project_bot) }
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 > Settings > External Authorization Classification Label setting' do RSpec.describe 'Projects > Settings > External Authorization Classification Label setting' do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project_empty_repo) } let(:project) { create(:project_empty_repo) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Projects > Settings > For a forked project', :js do RSpec.describe 'Projects > Settings > For a forked project', :js do
include ProjectForksHelper include ProjectForksHelper
let(:user) { create(:user) } let(:user) { create(:user) }
let(:original_project) { create(:project) } let(:original_project) { create(:project) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Projects > Settings > LFS settings' do RSpec.describe 'Projects > Settings > LFS settings' do
let(:project) { create(:project) } let(:project) { create(:project) }
let(:user) { create(:user) } let(:user) { create(:user) }
let(:role) { :maintainer } let(:role) { :maintainer }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Projects > Settings > For a forked project', :js do RSpec.describe 'Projects > Settings > For a forked project', :js do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project, :repository, create_templates: :issue) } let(:project) { create(:project, :repository, create_templates: :issue) }
let(:role) { :maintainer } let(:role) { :maintainer }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe "Projects > Settings > Pipelines settings" do RSpec.describe "Projects > Settings > Pipelines settings" do
let(:project) { create(:project) } let(:project) { create(:project) }
let(:user) { create(:user) } let(:user) { create(:user) }
let(:role) { :developer } let(:role) { :developer }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Project Badges' do RSpec.describe 'Project Badges' do
include WaitForRequests include WaitForRequests
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' do RSpec.describe 'Projects settings' do
let_it_be(:project) { create(:project) } let_it_be(:project) { create(:project) }
let(:user) { project.owner } let(:user) { project.owner }
let(:panel) { find('.general-settings', match: :first) } let(:panel) { find('.general-settings', match: :first) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Project > Settings > CI/CD > Container registry tag expiration policy', :js do RSpec.describe 'Project > Settings > CI/CD > Container registry tag expiration policy', :js do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project, namespace: user.namespace, container_registry_enabled: container_registry_enabled) } let(:project) { create(:project, namespace: user.namespace, container_registry_enabled: container_registry_enabled) }
let(:container_registry_enabled) { true } let(:container_registry_enabled) { true }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Projects > Settings > Repository settings' do RSpec.describe 'Projects > Settings > Repository settings' do
let(:project) { create(:project_empty_repo) } let(:project) { create(:project_empty_repo) }
let(:user) { create(:user) } let(:user) { create(:user) }
let(:role) { :developer } let(:role) { :developer }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Projects > Settings > User archives a project' do RSpec.describe 'Projects > Settings > User archives a project' 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 'Projects > Settings > User changes avatar' do RSpec.describe 'Projects > Settings > User changes avatar' do
let(:project) { create(:project, :repository) } let(:project) { create(:project, :repository) }
let(:user) { project.creator } let(:user) { project.creator }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Projects > Settings > User changes default branch' do RSpec.describe 'Projects > Settings > User changes default branch' do
include Select2Helper include Select2Helper
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require "spec_helper" require "spec_helper"
describe "User interacts with deploy keys", :js do RSpec.describe "User interacts with deploy keys", :js do
let(:project) { create(:project, :repository) } let(:project) { create(:project, :repository) }
let(:user) { project.owner } let(:user) { project.owner }
......
# frozen_string_literal: true # frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe 'Projects > Settings > User manages merge request settings' do RSpec.describe 'Projects > Settings > User manages merge request settings' do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project, :public, namespace: user.namespace, path: 'gitlab', name: 'sample') } let(:project) { create(:project, :public, namespace: user.namespace, path: 'gitlab', name: 'sample') }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Projects > Settings > User manages project members' do RSpec.describe 'Projects > Settings > User manages project members' do
let(:group) { create(:group, name: 'OpenSource') } let(:group) { create(:group, name: 'OpenSource') }
let(:project) { create(:project) } let(:project) { create(:project) }
let(:project2) { create(:project) } let(:project2) { create(:project) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Projects > Settings > User renames a project' do RSpec.describe 'Projects > Settings > User renames a project' do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project, namespace: user.namespace, path: 'gitlab', name: 'sample') } let(:project) { create(:project, namespace: user.namespace, path: 'gitlab', name: 'sample') }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Repository Settings > User sees revoke deploy token modal', :js do RSpec.describe 'Repository Settings > User sees revoke deploy token modal', :js do
let(:project) { create(:project, :public, :repository) } let(:project) { create(:project, :public, :repository) }
let(:user) { project.creator } let(:user) { project.creator }
let(:role) { :developer } let(:role) { :developer }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Projects > Settings > User tags a project' do RSpec.describe 'Projects > Settings > User tags a project' do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project, namespace: user.namespace) } let(:project) { create(:project, namespace: user.namespace) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Projects > Settings > User transfers a project', :js do RSpec.describe 'Projects > Settings > User transfers a project', :js 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) }
let(:group) { create(:group) } let(:group) { create(:group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Projects > Settings > Visibility settings', :js do RSpec.describe 'Projects > Settings > Visibility settings', :js do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project, namespace: user.namespace, visibility_level: 20) } let(:project) { create(:project, namespace: user.namespace, visibility_level: 20) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Projects > Settings > Webhook Settings' do RSpec.describe 'Projects > Settings > Webhook Settings' do
let(:project) { create(:project) } let(:project) { create(:project) }
let(:user) { create(:user) } let(:user) { create(:user) }
let(:webhooks_path) { project_hooks_path(project) } let(:webhooks_path) { project_hooks_path(project) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Projects > Show > Developer views empty project instructions' do RSpec.describe 'Projects > Show > Developer views empty project instructions' do
let(:project) { create(:project, :empty_repo) } let(:project) { create(:project, :empty_repo) }
let(:developer) { create(:user) } let(:developer) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Projects > Show > Download buttons' do RSpec.describe 'Projects > Show > Download buttons' do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:role) { :developer } let(:role) { :developer }
let(:status) { 'success' } let(:status) { 'success' }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'No Password Alert' do RSpec.describe 'No Password Alert' do
let(:project) { create(:project, :repository, namespace: user.namespace) } let(:project) { create(:project, :repository, namespace: user.namespace) }
context 'with internal auth enabled' do context 'with internal auth enabled' do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Projects > Show > Redirects' do RSpec.describe 'Projects > Show > Redirects' do
let(:user) { create :user } let(:user) { create :user }
let(:public_project) { create :project, :public } let(:public_project) { create :project, :public }
let(:private_project) { create :project, :private } let(:private_project) { create :project, :private }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Projects > Show > RSS' do RSpec.describe 'Projects > Show > RSS' do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project, :repository, visibility_level: Gitlab::VisibilityLevel::PUBLIC) } let(:project) { create(:project, :repository, visibility_level: Gitlab::VisibilityLevel::PUBLIC) }
let(:path) { project_path(project) } let(:path) { project_path(project) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Project > Show > User interacts with auto devops implicitly enabled banner' do RSpec.describe 'Project > Show > User interacts with auto devops implicitly enabled banner' 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 > Show > User interacts with project stars' do RSpec.describe 'Projects > Show > User interacts with project stars' do
let(:project) { create(:project, :public, :repository) } let(:project) { create(:project, :public, :repository) }
context 'when user is signed in', :js do context 'when user is signed in', :js do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Projects > Show > User manages notifications', :js do RSpec.describe 'Projects > Show > User manages notifications', :js do
let(:project) { create(:project, :public, :repository) } let(:project) { create(:project, :public, :repository) }
before do before do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Projects > Show > Collaboration links', :js do RSpec.describe 'Projects > Show > Collaboration links', :js do
using RSpec::Parameterized::TableSyntax using RSpec::Parameterized::TableSyntax
let(:project) { create(:project, :repository, :public) } let(:project) { create(:project, :repository, :public) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Projects > Show > User sees a deletion failure message' do RSpec.describe 'Projects > Show > User sees a deletion failure message' do
let(:project) { create(:project, :empty_repo, pending_delete: true) } let(:project) { create(:project, :empty_repo, pending_delete: true) }
before do before do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Projects > Show > User sees Git instructions' do RSpec.describe 'Projects > Show > User sees Git instructions' do
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
shared_examples_for 'redirects to the sign in page' do shared_examples_for 'redirects to the sign in page' do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Projects > Show > User sees last commit CI status' do RSpec.describe 'Projects > Show > User sees last commit CI status' do
let_it_be(:project) { create(:project, :repository, :public) } let_it_be(:project) { create(:project, :repository, :public) }
it 'shows the project README', :js do it 'shows the project README', :js do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Projects > Show > User sees README' do RSpec.describe 'Projects > Show > User sees README' do
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
let_it_be(:project) { create(:project, :repository, :public) } let_it_be(:project) { create(:project, :repository, :public) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Projects > Show > User sees setup shortcut buttons' do RSpec.describe 'Projects > Show > User sees setup shortcut buttons' do
# For "New file", "Add license" functionality, # For "New file", "Add license" functionality,
# see spec/features/projects/files/project_owner_creates_license_file_spec.rb # see spec/features/projects/files/project_owner_creates_license_file_spec.rb
# see spec/features/projects/files/project_owner_sees_link_to_create_license_file_in_empty_project_spec.rb # see spec/features/projects/files/project_owner_sees_link_to_create_license_file_in_empty_project_spec.rb
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Projects > Show > User uploads files' do RSpec.describe 'Projects > Show > User uploads files' do
include DropzoneHelper include DropzoneHelper
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
shared_examples_for 'snippet editor' do RSpec.shared_examples_for 'snippet editor' do
before do before do
stub_feature_flags(snippets_edit_vue: false) stub_feature_flags(snippets_edit_vue: false)
end end
...@@ -138,7 +138,7 @@ shared_examples_for 'snippet editor' do ...@@ -138,7 +138,7 @@ shared_examples_for 'snippet editor' do
end end
end end
describe 'Projects > Snippets > Create Snippet', :js do RSpec.describe 'Projects > Snippets > Create Snippet', :js do
include DropzoneHelper include DropzoneHelper
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 > Snippets > Project snippet', :js do RSpec.describe 'Projects > Snippets > Project snippet', :js do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project, :repository) } let(:project) { create(:project, :repository) }
let(:snippet) { create(:project_snippet, project: project, file_name: file_name, content: content) } let(:snippet) { create(:project_snippet, project: project, file_name: file_name, content: content) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Projects > Snippets > User comments on a snippet', :js do RSpec.describe 'Projects > Snippets > User comments on a snippet', :js 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) }
let_it_be(:snippet) { create(:project_snippet, :repository, project: project, author: user) } let_it_be(:snippet) { create(:project_snippet, :repository, project: project, author: user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Projects > Snippets > User deletes a snippet' do RSpec.describe 'Projects > Snippets > User deletes a snippet' do
let(:project) { create(:project) } let(:project) { create(:project) }
let!(:snippet) { create(:project_snippet, project: project, author: user) } let!(:snippet) { create(:project_snippet, project: project, author: user) }
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Projects > Snippets > User updates a snippet', :js do RSpec.describe 'Projects > Snippets > User updates a snippet', :js do
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
let_it_be(:project) { create(:project, namespace: user.namespace) } let_it_be(:project) { create(:project, namespace: user.namespace) }
let_it_be(:snippet, reload: true) { create(:project_snippet, :repository, project: project, author: user) } let_it_be(:snippet, reload: true) { create(:project_snippet, :repository, project: project, author: user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Projects > Snippets > User views snippets' do RSpec.describe 'Projects > Snippets > User views snippets' do
let_it_be(:project) { create(:project) } let_it_be(: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 'Sourcegraph Content Security Policy' do RSpec.describe 'Sourcegraph Content Security Policy' do
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
let_it_be(:project) { create(:project, :repository, namespace: user.namespace) } let_it_be(:project) { create(:project, :repository, namespace: user.namespace) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Subgroup Issuables', :js do RSpec.describe 'Subgroup Issuables', :js do
let!(:group) { create(:group, name: 'group') } let!(:group) { create(:group, name: 'group') }
let!(:subgroup) { create(:group, parent: group, name: 'subgroup') } let!(:subgroup) { create(:group, parent: group, name: 'subgroup') }
let!(:project) { create(:project, namespace: subgroup, name: 'project') } let!(:project) { create(:project, namespace: subgroup, name: 'project') }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Download buttons in tags page' do RSpec.describe 'Download buttons in tags page' do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:role) { :developer } let(:role) { :developer }
let(:status) { 'success' } let(:status) { 'success' }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Project > Tags', :js do RSpec.describe 'Project > Tags', :js do
include DropzoneHelper include DropzoneHelper
let(:user) { create(:user) } let(:user) { create(:user) }
......
# frozen_string_literal: true # frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe 'User views tags', :feature do RSpec.describe 'User views tags', :feature do
context 'rss' do context 'rss' do
shared_examples 'has access to the tags RSS feed' do shared_examples 'has access to the tags RSS feed' do
it do it do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Multi-file editor new directory', :js do RSpec.describe 'Multi-file editor new directory', :js 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 'Multi-file editor new file', :js do RSpec.describe 'Multi-file editor new file', :js 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 'Project Tree RSS' do RSpec.describe 'Project Tree RSS' do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project, :repository, visibility_level: Gitlab::VisibilityLevel::PUBLIC) } let(:project) { create(:project, :repository, visibility_level: Gitlab::VisibilityLevel::PUBLIC) }
let(:path) { project_tree_path(project, :master) } let(:path) { project_tree_path(project, :master) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Projects tree', :js do RSpec.describe 'Projects tree', :js do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project, :repository) } let(:project) { create(:project, :repository) }
let(:gravatar_enabled) { true } let(:gravatar_enabled) { true }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Multi-file editor upload file', :js do RSpec.describe 'Multi-file editor upload file', :js do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project, :repository) } let(:project) { create(:project, :repository) }
let(:txt_file) { File.join(Rails.root, 'spec', 'fixtures', 'doc_sample.txt') } let(:txt_file) { File.join(Rails.root, 'spec', 'fixtures', 'doc_sample.txt') }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'User changes public project visibility', :js do RSpec.describe 'User changes public project visibility', :js do
include ProjectForksHelper include ProjectForksHelper
before do before do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'User creates a project', :js do RSpec.describe 'User creates a project', :js 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 'Projects > User sees sidebar' do RSpec.describe 'Projects > User sees sidebar' do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project, :private, public_builds: false, namespace: user.namespace) } let(:project) { create(:project, :private, public_builds: false, namespace: user.namespace) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'User sees user popover', :js do RSpec.describe 'User sees user popover', :js do
include Spec::Support::Helpers::Features::NotesHelpers include Spec::Support::Helpers::Features::NotesHelpers
let_it_be(:project) { create(:project, :repository) } let_it_be(:project) { create(:project, :repository) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'User uses shortcuts', :js do RSpec.describe 'User uses shortcuts', :js 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 'User views an empty project' do RSpec.describe 'User views an empty project' do
let(:project) { create(:project, :empty_repo) } let(:project) { create(:project, :empty_repo) }
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'View on environment', :js do RSpec.describe 'View on environment', :js do
let(:branch_name) { 'feature' } let(:branch_name) { 'feature' }
let(:file_path) { 'files/ruby/feature.rb' } let(:file_path) { 'files/ruby/feature.rb' }
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 > Wiki > User previews markdown changes', :js do RSpec.describe 'Projects > Wiki > User previews markdown changes', :js do
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
let(:project) { create(:project, :wiki_repo, namespace: user.namespace) } let(:project) { create(:project, :wiki_repo, namespace: user.namespace) }
let(:wiki_page) { create(:wiki_page, wiki: project.wiki, title: 'home', content: '[some link](other-page)') } let(:wiki_page) { create(:wiki_page, wiki: project.wiki, title: 'home', content: '[some link](other-page)') }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Wiki shortcuts', :js do RSpec.describe 'Wiki shortcuts', :js do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project, :wiki_repo, namespace: user.namespace) } let(:project) { create(:project, :wiki_repo, namespace: user.namespace) }
let(:wiki_page) { create(:wiki_page, wiki: project.wiki, title: 'home', content: 'Home page') } let(:wiki_page) { create(:wiki_page, wiki: project.wiki, title: 'home', content: 'Home page') }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require "spec_helper" require "spec_helper"
describe "User creates wiki page" do RSpec.describe "User creates wiki page" do
include WikiHelpers include WikiHelpers
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'User deletes wiki page', :js do RSpec.describe 'User deletes wiki page', :js do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project, :wiki_repo, namespace: user.namespace) } let(:project) { create(:project, :wiki_repo, namespace: user.namespace) }
let(:wiki_page) { create(:wiki_page, wiki: project.wiki) } let(:wiki_page) { create(:wiki_page, wiki: project.wiki) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Projects > Wiki > User views Git access wiki page' do RSpec.describe 'Projects > Wiki > User views Git access wiki page' do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project, :wiki_repo, :public) } let(:project) { create(:project, :wiki_repo, :public) }
let(:wiki_page) { create(:wiki_page, wiki: project.wiki, title: 'home', content: '[some link](other-page)') } let(:wiki_page) { create(:wiki_page, wiki: project.wiki, title: 'home', content: '[some link](other-page)') }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'User updates wiki page' do RSpec.describe 'User updates wiki page' do
include WikiHelpers include WikiHelpers
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'User views empty wiki' do RSpec.describe 'User views empty wiki' do
let(:user) { create(:user) } let(:user) { create(:user) }
shared_examples 'empty wiki and accessible issues' do shared_examples 'empty wiki and accessible issues' do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Projects > Wiki > User views wiki in project page' do RSpec.describe 'Projects > Wiki > User views wiki in project page' 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 'User views a wiki page' do RSpec.describe 'User views a wiki page' do
include WikiHelpers include WikiHelpers
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'User views wiki pages' do RSpec.describe 'User views wiki pages' do
include WikiHelpers include WikiHelpers
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'User views AsciiDoc page with includes', :js do RSpec.describe 'User views AsciiDoc page with includes', :js do
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
let_it_be(:wiki_content_selector) { '[data-qa-selector=wiki_page_content]' } let_it_be(:wiki_content_selector) { '[data-qa-selector=wiki_page_content]' }
let(:project) { create(:project, :public, :wiki_repo) } let(:project) { create(:project, :public, :wiki_repo) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Project' do RSpec.describe 'Project' do
include ProjectForksHelper include ProjectForksHelper
include MobileHelpers include MobileHelpers
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Protected Branches', :js do RSpec.describe 'Protected Branches', :js do
include ProtectedBranchHelpers include ProtectedBranchHelpers
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Protected Tags', :js do RSpec.describe 'Protected Tags', :js do
include ProtectedTagHelpers include ProtectedTagHelpers
let(:user) { create(:user, :admin) } let(:user) { create(:user, :admin) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'read-only message' do RSpec.describe 'read-only message' 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 'Reportable note on commit', :js do RSpec.describe 'Reportable note on commit', :js do
include RepoHelpers include RepoHelpers
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Reportable note on issue', :js do RSpec.describe 'Reportable note on issue', :js do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project) } let(:project) { create(:project) }
let(:issue) { create(:issue, project: project) } let(:issue) { create(:issue, project: project) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Reportable note on merge request', :js do RSpec.describe 'Reportable note on merge request', :js do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project, :repository) } let(:project) { create(:project, :repository) }
let(:merge_request) { create(:merge_request, source_project: project) } let(:merge_request) { create(:merge_request, source_project: project) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Reportable note on snippets', :js do RSpec.describe 'Reportable note on snippets', :js 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 'Runners' do RSpec.describe 'Runners' 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 'User searches for code' do RSpec.describe 'User searches for code' 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 'User searches for comments' do RSpec.describe 'User searches for comments' 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 'User searches for commits' do RSpec.describe 'User searches for commits' do
let(:project) { create(:project, :repository) } let(:project) { create(:project, :repository) }
let(:sha) { '6d394385cf567f80a8fd85055db1ab4c5295806f' } let(:sha) { '6d394385cf567f80a8fd85055db1ab4c5295806f' }
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'User searches for issues', :js do RSpec.describe 'User searches for issues', :js do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project, namespace: user.namespace) } let(:project) { create(:project, namespace: user.namespace) }
let!(:issue1) { create(:issue, title: 'Foo', project: project) } let!(:issue1) { create(:issue, title: 'Foo', project: project) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'User searches for merge requests', :js do RSpec.describe 'User searches for merge requests', :js do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project, namespace: user.namespace) } let(:project) { create(:project, namespace: user.namespace) }
let!(:merge_request1) { create(:merge_request, title: 'Foo', source_project: project, target_project: project) } let!(:merge_request1) { create(:merge_request, title: 'Foo', source_project: project, target_project: project) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'User searches for milestones', :js do RSpec.describe 'User searches for milestones', :js do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project, namespace: user.namespace) } let(:project) { create(:project, namespace: user.namespace) }
let!(:milestone1) { create(:milestone, title: 'Foo', project: project) } let!(:milestone1) { create(:milestone, title: 'Foo', project: project) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'User searches for projects' do RSpec.describe 'User searches for projects' do
let!(:project) { create(:project, :public, name: 'Shop') } let!(:project) { create(:project, :public, name: 'Shop') }
context 'when signed out' do context 'when signed out' do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'User searches for users' do RSpec.describe 'User searches for users' do
let(:user1) { create(:user, username: 'gob_bluth', name: 'Gob Bluth') } let(:user1) { create(:user, username: 'gob_bluth', name: 'Gob Bluth') }
let(:user2) { create(:user, username: 'michael_bluth', name: 'Michael Bluth') } let(:user2) { create(:user, username: 'michael_bluth', name: 'Michael Bluth') }
let(:user3) { create(:user, username: 'gob_2018', name: 'George Oscar Bluth') } let(:user3) { create(:user, username: 'gob_2018', name: 'George Oscar Bluth') }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'User searches for wiki pages', :js do RSpec.describe 'User searches for wiki pages', :js do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project, :repository, :wiki_repo, namespace: user.namespace) } let(:project) { create(:project, :repository, :wiki_repo, namespace: user.namespace) }
let!(:wiki_page) { create(:wiki_page, wiki: project.wiki, title: 'directory/title', content: 'Some Wiki content') } let!(:wiki_page) { create(:wiki_page, wiki: project.wiki, title: 'directory/title', content: 'Some Wiki content') }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'User uses header search field', :js do RSpec.describe 'User uses header search field', :js do
include FilteredSearchHelpers include FilteredSearchHelpers
let(:project) { create(:project) } let(:project) { create(:project) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'User uses search filters', :js do RSpec.describe 'User uses search filters', :js do
let(:group) { create(:group) } let(:group) { create(:group) }
let!(:group_project) { create(:project, group: group) } let!(:group_project) { create(:project, group: group) }
let(:project) { create(:project, namespace: user.namespace) } let(:project) { create(:project, namespace: user.namespace) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe "Admin::Projects" do RSpec.describe "Admin::Projects" do
include AccessMatchers include AccessMatchers
describe "GET /admin/projects" do describe "GET /admin/projects" do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe "Dashboard access" do RSpec.describe "Dashboard access" do
include AccessMatchers include AccessMatchers
describe "GET /dashboard" do describe "GET /dashboard" do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Internal Group access' do RSpec.describe 'Internal Group access' do
include AccessMatchers include AccessMatchers
let(:group) { create(:group, :internal) } let(:group) { create(:group, :internal) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Private Group access' do RSpec.describe 'Private Group access' do
include AccessMatchers include AccessMatchers
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 'Public Group access' do RSpec.describe 'Public Group access' do
include AccessMatchers include AccessMatchers
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 "Profile access" do RSpec.describe "Profile access" do
include AccessMatchers include AccessMatchers
describe "GET /profile/keys" do describe "GET /profile/keys" do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe "Internal Project Access" do RSpec.describe "Internal Project Access" do
include AccessMatchers include AccessMatchers
let_it_be(:project, reload: true) { create(:project, :internal, :repository) } let_it_be(:project, reload: true) { create(:project, :internal, :repository) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe "Private Project Access" do RSpec.describe "Private Project Access" do
include AccessMatchers include AccessMatchers
let_it_be(:project, reload: true) { create(:project, :private, :repository, public_builds: false) } let_it_be(:project, reload: true) { create(:project, :private, :repository, public_builds: false) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe "Public Project Access" do RSpec.describe "Public Project Access" do
include AccessMatchers include AccessMatchers
let_it_be(:project, reload: true) { create(:project, :public, :repository) } let_it_be(:project, reload: true) { create(:project, :public, :repository) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe "Internal Project Snippets Access" do RSpec.describe "Internal Project Snippets Access" do
include AccessMatchers include AccessMatchers
let(:project) { create(:project, :internal) } let(:project) { create(:project, :internal) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe "Private Project Snippets Access" do RSpec.describe "Private Project Snippets Access" do
include AccessMatchers include AccessMatchers
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 "Public Project Snippets Access" do RSpec.describe "Public Project Snippets Access" do
include AccessMatchers include AccessMatchers
let(:project) { create(:project, :public) } let(:project) { create(:project, :public) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Sentry' do RSpec.describe 'Sentry' do
let(:sentry_path) { '/sentry.chunk.js' } let(:sentry_path) { '/sentry.chunk.js' }
it 'does not load sentry if sentry is disabled' do it 'does not load sentry if sentry is disabled' do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'GPG signed commits' do RSpec.describe 'GPG signed commits' do
let(:project) { create(:project, :public, :repository) } let(:project) { create(:project, :public, :repository) }
it 'changes from unverified to verified when the user changes their email to match the gpg key', :sidekiq_might_not_need_inline do it 'changes from unverified to verified when the user changes their email to match the gpg key', :sidekiq_might_not_need_inline do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Embedded Snippets' do RSpec.describe 'Embedded Snippets' do
let(:snippet) { create(:personal_snippet, :public, file_name: 'random_dir.rb', content: content) } let(:snippet) { create(:personal_snippet, :public, file_name: 'random_dir.rb', content: content) }
let(:content) { "require 'fileutils'\nFileUtils.mkdir_p 'some/random_dir'\n" } let(:content) { "require 'fileutils'\nFileUtils.mkdir_p 'some/random_dir'\n" }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Explore Snippets' do RSpec.describe 'Explore Snippets' do
let!(:public_snippet) { create(:personal_snippet, :public) } let!(:public_snippet) { create(:personal_snippet, :public) }
let!(:internal_snippet) { create(:personal_snippet, :internal) } let!(:internal_snippet) { create(:personal_snippet, :internal) }
let!(:private_snippet) { create(:personal_snippet, :private) } let!(:private_snippet) { create(:personal_snippet, :private) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Internal Snippets', :js do RSpec.describe 'Internal Snippets', :js do
let(:internal_snippet) { create(:personal_snippet, :internal) } let(:internal_snippet) { create(:personal_snippet, :internal) }
before do before do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Comments on personal snippets', :js do RSpec.describe 'Comments on personal snippets', :js do
include NoteInteractionHelpers include NoteInteractionHelpers
let!(:user) { create(:user) } let!(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Private Snippets', :js do RSpec.describe 'Private Snippets', :js 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 'Public Snippets', :js do RSpec.describe 'Public Snippets', :js do
before do before do
stub_feature_flags(snippets_vue: false) stub_feature_flags(snippets_vue: false)
end end
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Search Snippets' do RSpec.describe 'Search Snippets' do
it 'User searches for snippets by title' do it 'User searches for snippets by title' do
public_snippet = create(:personal_snippet, :public, title: 'Beginning and Middle') public_snippet = create(:personal_snippet, :public, title: 'Beginning and Middle')
private_snippet = create(:personal_snippet, :private, title: 'Middle and End') private_snippet = create(:personal_snippet, :private, title: 'Middle and End')
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Snippet', :js do RSpec.describe 'Snippet', :js do
let(:project) { create(:project, :repository) } let(:project) { create(:project, :repository) }
let(:snippet) { create(:personal_snippet, :public, file_name: file_name, content: content) } let(:snippet) { create(:personal_snippet, :public, file_name: file_name, content: content) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
shared_examples_for 'snippet editor' do RSpec.shared_examples_for 'snippet editor' do
include_context 'includes Spam constants' include_context 'includes Spam constants'
def description_field def description_field
...@@ -122,7 +122,7 @@ shared_examples_for 'snippet editor' do ...@@ -122,7 +122,7 @@ shared_examples_for 'snippet editor' do
end end
end end
describe 'User creates snippet', :js do RSpec.describe 'User creates snippet', :js do
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
it_behaves_like "snippet editor" it_behaves_like "snippet editor"
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
shared_examples_for 'snippet editor' do RSpec.shared_examples_for 'snippet editor' do
before do before do
stub_feature_flags(snippets_vue: false) stub_feature_flags(snippets_vue: false)
stub_feature_flags(snippets_edit_vue: false) stub_feature_flags(snippets_edit_vue: false)
...@@ -180,7 +180,7 @@ shared_examples_for 'snippet editor' do ...@@ -180,7 +180,7 @@ shared_examples_for 'snippet editor' do
end end
end end
describe 'User creates snippet', :js do RSpec.describe 'User creates snippet', :js do
include DropzoneHelper include DropzoneHelper
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 'User deletes snippet' do RSpec.describe 'User deletes snippet' do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:content) { 'puts "test"' } let(:content) { 'puts "test"' }
let(:snippet) { create(:personal_snippet, :public, content: content, author: user) } let(:snippet) { create(:personal_snippet, :public, content: content, author: user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'User edits snippet', :js do RSpec.describe 'User edits snippet', :js do
include DropzoneHelper include DropzoneHelper
let_it_be(:file_name) { 'test.rb' } let_it_be(:file_name) { 'test.rb' }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'User Snippets' do RSpec.describe 'User Snippets' do
let(:author) { create(:user) } let(:author) { create(:user) }
let!(:public_snippet) { create(:personal_snippet, :public, author: author, title: "This is a public snippet") } let!(:public_snippet) { create(:personal_snippet, :public, author: author, title: "This is a public snippet") }
let!(:internal_snippet) { create(:personal_snippet, :internal, author: author, title: "This is an internal snippet") } let!(:internal_snippet) { create(:personal_snippet, :internal, author: author, title: "This is an internal snippet") }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Snippets' do RSpec.describe 'Snippets' do
context 'when the project has snippets' do context 'when the project has snippets' do
let(:project) { create(:project, :public) } let(:project) { create(:project, :public) }
let!(:snippets) { create_list(:project_snippet, 2, :public, author: project.owner, project: project) } let!(:snippets) { create_list(:project_snippet, 2, :public, author: project.owner, project: project) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Static Site Editor' do RSpec.describe 'Static Site Editor' do
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
let_it_be(:project) { create(:project, :public, :repository) } let_it_be(:project) { create(:project, :public, :repository) }
......
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