Commit c7afdd78 authored by Arturo Herrero's avatar Arturo Herrero

RSpec zero monkey patching mode

The plan for RSpec 4.0 is to disable monkey patching:
https://rspec.info/blog/2013/07/the-plan-for-rspec-3/#zero-monkey-patching-mode

This commit stops using RSpec monkey patching in some specs:
https://relishapp.com/rspec/rspec-core/docs/configuration/zero-monkey-patching-mode
parent 211d5e63
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe "Admin Runners" do RSpec.describe "Admin Runners" do
include StubENV include StubENV
include FilteredSearchHelpers include FilteredSearchHelpers
include SortingHelper include SortingHelper
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe "Admin > Admin sees project statistics" do RSpec.describe "Admin > Admin sees project statistics" do
let(:current_user) { create(:admin) } let(:current_user) { create(:admin) }
before do before do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe "Admin > Admin sees projects statistics" do RSpec.describe "Admin > Admin sees projects statistics" do
let(:current_user) { create(:admin) } let(:current_user) { create(:admin) }
before do before do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Admin Serverless Domains', :js do RSpec.describe 'Admin Serverless Domains', :js do
let(:sample_domain) { build(:pages_domain) } let(:sample_domain) { build(:pages_domain) }
before do before do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Admin updates settings', :clean_gitlab_redis_shared_state, :do_not_mock_admin_mode do RSpec.describe 'Admin updates settings', :clean_gitlab_redis_shared_state, :do_not_mock_admin_mode do
include StubENV include StubENV
include TermsHelper include TermsHelper
include UsageDataHelpers include UsageDataHelpers
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Admin System Info' do RSpec.describe 'Admin System Info' do
before do before do
sign_in(create(:admin)) sign_in(create(:admin))
end end
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Admin > Users > Impersonation Tokens', :js do RSpec.describe 'Admin > Users > Impersonation Tokens', :js do
let(:admin) { create(:admin) } let(:admin) { create(:admin) }
let!(:user) { create(:user) } let!(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe "Admin::Users" do RSpec.describe "Admin::Users" do
include Spec::Support::Helpers::Features::ResponsiveTableHelpers include Spec::Support::Helpers::Features::ResponsiveTableHelpers
let!(:user) do let!(:user) do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Admin uses repository checks', :request_store, :clean_gitlab_redis_shared_state, :do_not_mock_admin_mode do RSpec.describe 'Admin uses repository checks', :request_store, :clean_gitlab_redis_shared_state, :do_not_mock_admin_mode do
include StubENV include StubENV
let(:admin) { create(:admin) } let(:admin) { create(:admin) }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
require 'spec_helper' require 'spec_helper'
require_relative '../../../../spec/features/clusters/installing_applications_shared_examples' require_relative '../../../../spec/features/clusters/installing_applications_shared_examples'
describe 'Instance-level Cluster Applications', :js do RSpec.describe 'Instance-level Cluster Applications', :js do
include GoogleApi::CloudPlatformHelpers include GoogleApi::CloudPlatformHelpers
let(:user) { create(:admin) } let(:user) { create(:admin) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Instance-level AWS EKS Cluster', :js do RSpec.describe 'Instance-level AWS EKS Cluster', :js do
let(:user) { create(:admin) } let(:user) { create(:admin) }
before do before do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'admin visits dashboard' do RSpec.describe 'admin visits dashboard' do
include ProjectForksHelper include ProjectForksHelper
before do before do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Admin activates Prometheus', :js do RSpec.describe 'Admin activates Prometheus', :js do
let(:admin) { create(:user, :admin) } let(:admin) { create(:user, :admin) }
before do before do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe "Dashboard Issues Feed" do RSpec.describe "Dashboard Issues Feed" do
describe "GET /issues" do describe "GET /issues" do
let!(:user) { create(:user, email: 'private1@example.com', public_email: 'public1@example.com') } let!(:user) { create(:user, email: 'private1@example.com', public_email: 'public1@example.com') }
let!(:assignee) { create(:user, email: 'private2@example.com', public_email: 'public2@example.com') } let!(:assignee) { create(:user, email: 'private2@example.com', public_email: 'public2@example.com') }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe "Dashboard Feed" do RSpec.describe "Dashboard Feed" do
describe "GET /" do describe "GET /" do
let!(:user) { create(:user, name: "Jonh") } let!(:user) { create(:user, name: "Jonh") }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Issues Feed' do RSpec.describe 'Issues Feed' do
describe 'GET /issues' do describe 'GET /issues' do
let!(:user) { create(:user, email: 'private1@example.com', public_email: 'public1@example.com') } let!(:user) { create(:user, email: 'private1@example.com', public_email: 'public1@example.com') }
let!(:assignee) { create(:user, email: 'private2@example.com', public_email: 'public2@example.com') } let!(:assignee) { create(:user, email: 'private2@example.com', public_email: 'public2@example.com') }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe "User Feed" do RSpec.describe "User Feed" do
describe "GET /" do describe "GET /" do
let!(:user) { create(:user) } let!(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Issue Boards add issue modal', :js do RSpec.describe 'Issue Boards add issue modal', :js do
let(:project) { create(:project, :public) } let(:project) { create(:project, :public) }
let(:board) { create(:board, project: project) } let(:board) { create(:board, project: project) }
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Issue Boards', :js do RSpec.describe 'Issue Boards', :js do
include DragTo include DragTo
include MobileHelpers include MobileHelpers
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Issue Boards focus mode', :js do RSpec.describe 'Issue Boards focus mode', :js do
let(:project) { create(:project, :public) } let(:project) { create(:project, :public) }
before do before do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Issue Boards', :js do RSpec.describe 'Issue Boards', :js do
include DragTo include DragTo
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 'Issue Boards shortcut', :js do RSpec.describe 'Issue Boards shortcut', :js do
context 'issues are enabled' do context 'issues are enabled' do
let(:project) { create(:project) } let(:project) { create(:project) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Issue Boards add issue modal filtering', :js do RSpec.describe 'Issue Boards add issue modal filtering', :js do
let(:project) { create(:project, :public) } let(:project) { create(:project, :public) }
let(:board) { create(:board, project: project) } let(:board) { create(:board, project: project) }
let(:planning) { create(:label, project: project, name: 'Planning') } let(:planning) { create(:label, project: project, name: 'Planning') }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Multi Select Issue', :js do RSpec.describe 'Multi Select Issue', :js do
include DragTo include DragTo
let(:group) { create(:group, :nested) } let(:group) { create(:group, :nested) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Multiple Issue Boards', :js do RSpec.describe 'Multiple Issue Boards', :js do
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
let_it_be(:project) { create(:project, :public) } let_it_be(:project) { create(:project, :public) }
let_it_be(:planning) { create(:label, project: project, name: 'Planning') } let_it_be(:planning) { create(:label, project: project, name: 'Planning') }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Issue Boards new issue', :js do RSpec.describe 'Issue Boards new issue', :js do
let(:project) { create(:project, :public) } let(:project) { create(:project, :public) }
let(:board) { create(:board, project: project) } let(:board) { create(:board, project: project) }
let!(:list) { create(:list, board: board, position: 0) } let!(:list) { create(:list, board: board, position: 0) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Ensure Boards do not show stale data on browser back', :js do RSpec.describe 'Ensure Boards do not show stale data on browser back', :js do
let(:project) {create(:project, :public)} let(:project) {create(:project, :public)}
let(:board) {create(:board, project: project)} let(:board) {create(:board, project: project)}
let(:user) {create(:user)} let(:user) {create(:user)}
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Issue Boards', :js do RSpec.describe 'Issue Boards', :js do
include BoardHelpers include BoardHelpers
include FilteredSearchHelpers include FilteredSearchHelpers
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Sub-group project issue boards', :js do RSpec.describe 'Sub-group project issue boards', :js do
let(:group) { create(:group) } let(:group) { create(:group) }
let(:nested_group_1) { create(:group, parent: group) } let(:nested_group_1) { create(:group, parent: group) }
let(:project) { create(:project, group: nested_group_1) } let(:project) { create(:project, group: nested_group_1) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Broadcast Messages' do RSpec.describe 'Broadcast Messages' do
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
shared_examples 'a Broadcast Messages' do |type| shared_examples 'a Broadcast Messages' do |type|
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Contributions Calendar', :js do RSpec.describe 'Contributions Calendar', :js do
include MobileHelpers include MobileHelpers
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Clusterable > Show page' do RSpec.describe 'Clusterable > Show page' do
include KubernetesHelpers include KubernetesHelpers
let(:current_user) { create(:user) } let(:current_user) { create(:user) }
......
# frozen_string_literal: true # frozen_string_literal: true
shared_examples "installing applications for a cluster" do |managed_apps_local_tiller| RSpec.shared_examples "installing applications for a cluster" do |managed_apps_local_tiller|
before do before do
stub_feature_flags(managed_apps_local_tiller: managed_apps_local_tiller) stub_feature_flags(managed_apps_local_tiller: managed_apps_local_tiller)
...@@ -279,7 +279,7 @@ shared_examples "installing applications for a cluster" do |managed_apps_local_t ...@@ -279,7 +279,7 @@ shared_examples "installing applications for a cluster" do |managed_apps_local_t
end end
end end
shared_examples "installing applications on a cluster" do RSpec.shared_examples "installing applications on a cluster" do
it_behaves_like "installing applications for a cluster", false it_behaves_like "installing applications for a cluster", false
it_behaves_like "installing applications for a cluster", true it_behaves_like "installing applications for a cluster", true
end end
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Commit > User uses quick actions', :js do RSpec.describe 'Commit > User uses quick actions', :js do
include Spec::Support::Helpers::Features::NotesHelpers include Spec::Support::Helpers::Features::NotesHelpers
include RepoHelpers include RepoHelpers
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Commit > User view commits' do RSpec.describe 'Commit > User view commits' do
let_it_be(:project) { create(:project, :public, :repository) } let_it_be(:project) { create(:project, :public, :repository) }
let_it_be(:user) { project.creator } let_it_be(:user) { project.creator }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Commits' do RSpec.describe 'Commits' do
let_it_be(:project) { create(:project, :repository) } let_it_be(:project) { create(:project, :repository) }
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 'Contextual sidebar', :js do RSpec.describe 'Contextual sidebar', :js do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project) } let(:project) { create(:project) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Value Stream Analytics', :js do RSpec.describe 'Value Stream Analytics', :js do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:guest) { create(:user) } let(:guest) { 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 'Dashboard > Activity' do RSpec.describe 'Dashboard > Activity' 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 'Tooltips on .timeago dates', :js do RSpec.describe 'Tooltips on .timeago dates', :js do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project, name: 'test', namespace: user.namespace) } let(:project) { create(:project, name: 'test', namespace: user.namespace) }
let(:created_date) { Date.yesterday.to_time } let(:created_date) { Date.yesterday.to_time }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'The group dashboard' do RSpec.describe 'The group dashboard' do
include ExternalAuthorizationServiceHelpers include ExternalAuthorizationServiceHelpers
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Dashboard Groups page', :js do RSpec.describe 'Dashboard Groups page', :js do
let(:user) { create :user } let(:user) { create :user }
let(:group) { create(:group) } let(:group) { create(:group) }
let(:nested_group) { create(:group, :nested) } let(:nested_group) { create(:group, :nested) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Showing analytics' do RSpec.describe 'Showing analytics' do
before do before do
sign_in user if user sign_in user if user
end end
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Navigation bar counter', :use_clean_rails_memory_store_caching do RSpec.describe 'Navigation bar counter', :use_clean_rails_memory_store_caching do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project, namespace: user.namespace) } let(:project) { create(:project, namespace: user.namespace) }
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 'Dashboard Issues filtering', :js do RSpec.describe 'Dashboard Issues filtering', :js do
include Spec::Support::Helpers::Features::SortingHelpers include Spec::Support::Helpers::Features::SortingHelpers
include FilteredSearchHelpers include FilteredSearchHelpers
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Dashboard > label filter', :js do RSpec.describe 'Dashboard > label filter', :js do
include FilteredSearchHelpers include FilteredSearchHelpers
let(:filtered_search) { find('.filtered-search') } let(:filtered_search) { find('.filtered-search') }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Dashboard Merge Requests' do RSpec.describe 'Dashboard Merge Requests' do
include Spec::Support::Helpers::Features::SortingHelpers include Spec::Support::Helpers::Features::SortingHelpers
include FilteredSearchHelpers include FilteredSearchHelpers
include ProjectForksHelper include ProjectForksHelper
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Dashboard > Milestones' do RSpec.describe 'Dashboard > Milestones' do
describe 'as anonymous user' do describe 'as anonymous user' do
before do before do
visit dashboard_milestones_path visit dashboard_milestones_path
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Project member activity', :js do RSpec.describe 'Project member activity', :js do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project, :public, name: 'x', namespace: user.namespace) } let(:project) { create(:project, :public, name: 'x', namespace: user.namespace) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Dashboard Projects' do RSpec.describe 'Dashboard Projects' do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project, :repository, name: 'awesome stuff') } let(:project) { create(:project, :repository, name: 'awesome stuff') }
let(:project2) { create(:project, :public, name: 'Community project') } let(:project2) { create(:project, :public, name: 'Community project') }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Root explore' do RSpec.describe 'Root explore' do
let_it_be(:public_project) { create(:project, :public) } let_it_be(:public_project) { create(:project, :public) }
let_it_be(:archived_project) { create(:project, :archived) } let_it_be(:archived_project) { create(:project, :archived) }
let_it_be(:internal_project) { create(:project, :internal) } let_it_be(:internal_project) { create(:project, :internal) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Dashboard shortcuts', :js do RSpec.describe 'Dashboard shortcuts', :js do
context 'logged in' do context 'logged in' do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project) } let(:project) { create(:project) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Dashboard snippets' do RSpec.describe 'Dashboard snippets' do
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
context 'when the project has snippets' do context 'when the project has snippets' do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Dashboard > Todo target states' do RSpec.describe 'Dashboard > Todo target states' do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:author) { create(:user) } let(:author) { create(:user) }
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 'Dashboard > User filters todos', :js do RSpec.describe 'Dashboard > User filters todos', :js do
let(:user_1) { create(:user, username: 'user_1', name: 'user_1') } let(:user_1) { create(:user, username: 'user_1', name: 'user_1') }
let(:user_2) { create(:user, username: 'user_2', name: 'user_2') } let(:user_2) { create(:user, username: 'user_2', name: 'user_2') }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Dashboard > User sorts todos' do RSpec.describe 'Dashboard > User sorts todos' do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project) } let(:project) { create(:project) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Dashboard Todos' do RSpec.describe 'Dashboard Todos' do
let_it_be(:user) { create(:user, username: 'john') } let_it_be(:user) { create(:user, username: 'john') }
let_it_be(:author) { create(:user) } let_it_be(:author) { create(:user) }
let_it_be(:project) { create(:project, :public) } let_it_be(:project) { create(:project, :public) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Dashboard > User filters projects' do RSpec.describe 'Dashboard > User filters projects' do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project, name: 'Victorialand', namespace: user.namespace, created_at: 2.seconds.ago, updated_at: 2.seconds.ago) } let(:project) { create(:project, name: 'Victorialand', namespace: user.namespace, created_at: 2.seconds.ago, updated_at: 2.seconds.ago) }
let(:user2) { create(:user) } let(:user2) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Thread Comments Commit', :js do RSpec.describe 'Thread Comments 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 'Thread Comments Issue', :js do RSpec.describe 'Thread Comments 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 'Thread Comments Merge Request', :js do RSpec.describe 'Thread Comments 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 'Thread Comments Snippet', :js do RSpec.describe 'Thread Comments Snippet', :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) }
let_it_be(:snippet) { create(:project_snippet, :private, :repository, project: project, author: user) } let_it_be(:snippet) { create(:project_snippet, :private, :repository, project: project, author: user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Display system header and footer bar' do RSpec.describe 'Display system header and footer bar' do
let(:header_message) { "Foo" } let(:header_message) { "Foo" }
let(:footer_message) { "Bar" } let(:footer_message) { "Bar" }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Error Pages' do RSpec.describe 'Error Pages' 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' require 'spec_helper'
describe 'When a user filters Sentry errors by status', :js, :use_clean_rails_memory_store_caching, :sidekiq_inline do RSpec.describe 'When a user filters Sentry errors by status', :js, :use_clean_rails_memory_store_caching, :sidekiq_inline do
include_context 'sentry error tracking context feature' include_context 'sentry error tracking context feature'
let_it_be(:issues_response_body) { fixture_file('sentry/issues_sample_response.json') } let_it_be(:issues_response_body) { fixture_file('sentry/issues_sample_response.json') }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'When a user searches for Sentry errors', :js, :use_clean_rails_memory_store_caching, :sidekiq_inline do RSpec.describe 'When a user searches for Sentry errors', :js, :use_clean_rails_memory_store_caching, :sidekiq_inline do
include_context 'sentry error tracking context feature' include_context 'sentry error tracking context feature'
let_it_be(:issues_response_body) { fixture_file('sentry/issues_sample_response.json') } let_it_be(:issues_response_body) { fixture_file('sentry/issues_sample_response.json') }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'View error details page', :js, :use_clean_rails_memory_store_caching, :sidekiq_inline do RSpec.describe 'View error details page', :js, :use_clean_rails_memory_store_caching, :sidekiq_inline do
include_context 'sentry error tracking context feature' include_context 'sentry error tracking context feature'
context 'with current user as project owner' do context 'with current user as project owner' do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'View error index page', :js, :use_clean_rails_memory_store_caching, :sidekiq_inline do RSpec.describe 'View error index page', :js, :use_clean_rails_memory_store_caching, :sidekiq_inline do
include_context 'sentry error tracking context feature' include_context 'sentry error tracking context feature'
let_it_be(:issues_response_body) { fixture_file('sentry/issues_sample_response.json') } let_it_be(:issues_response_body) { fixture_file('sentry/issues_sample_response.json') }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Expand and collapse diffs', :js do RSpec.describe 'Expand and collapse diffs', :js do
let(:branch) { 'expand-collapse-diffs' } let(:branch) { 'expand-collapse-diffs' }
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 'Explore Groups page', :js do RSpec.describe 'Explore Groups page', :js do
let!(:user) { create :user } let!(:user) { create :user }
let!(:group) { create(:group) } let!(:group) { create(:group) }
let!(:public_group) { create(:group, :public) } let!(:public_group) { create(:group, :public) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Explore Groups', :js do RSpec.describe 'Explore Groups', :js do
let(:user) { create :user } let(:user) { create :user }
let(:group) { create :group } let(:group) { create :group }
let!(:private_project) do let!(:private_project) do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'User explores projects' do RSpec.describe 'User explores projects' do
let_it_be(:archived_project) { create(:project, :archived) } let_it_be(:archived_project) { create(:project, :archived) }
let_it_be(:internal_project) { create(:project, :internal) } let_it_be(:internal_project) { create(:project, :internal) }
let_it_be(:private_project) { create(:project, :private) } let_it_be(:private_project) { create(:project, :private) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Global search' do RSpec.describe 'Global search' 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 'GraphiQL' do RSpec.describe 'GraphiQL' do
context 'without relative_url_root' do context 'without relative_url_root' do
before do before do
visit '/-/graphql-explorer' visit '/-/graphql-explorer'
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Group variables', :js do RSpec.describe 'Group variables', :js do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:group) { create(:group) } let(:group) { create(:group) }
let!(:variable) { create(:ci_group_variable, key: 'test_key', value: 'test_value', masked: true, group: group) } let!(:variable) { create(:ci_group_variable, key: 'test_key', value: 'test_value', masked: true, group: group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Group activity page' do RSpec.describe 'Group activity page' do
let(:user) { create(:group_member, :developer, user: create(:user), group: group ).user } let(:user) { create(:group_member, :developer, user: create(:user), group: group ).user }
let(:group) { create(:group) } let(:group) { create(:group) }
let(:path) { activity_group_path(group) } let(:path) { activity_group_path(group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Group Issue Boards', :js do RSpec.describe 'Group Issue Boards', :js do
include BoardHelpers include BoardHelpers
let(:group) { create(:group) } let(:group) { create(:group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Group Boards' do RSpec.describe 'Group Boards' do
let(:group) { create(:group) } let(:group) { create(:group) }
let!(:project) { create(:project_empty_repo, group: group) } let!(:project) { create(:project_empty_repo, group: group) }
let(:user) { create(:group_member, :maintainer, user: create(:user), group: group ).user } let(:user) { create(:group_member, :maintainer, user: create(:user), group: group ).user }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
require 'spec_helper' require 'spec_helper'
require_relative '../../../../spec/features/clusters/installing_applications_shared_examples' require_relative '../../../../spec/features/clusters/installing_applications_shared_examples'
describe 'Group-level Cluster Applications', :js do RSpec.describe 'Group-level Cluster Applications', :js do
include GoogleApi::CloudPlatformHelpers include GoogleApi::CloudPlatformHelpers
let(:group) { create(:group) } let(:group) { create(:group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Group AWS EKS Cluster', :js do RSpec.describe 'Group AWS EKS Cluster', :js do
let(:group) { create(:group) } let(:group) { create(:group) }
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'User Cluster', :js do RSpec.describe 'User Cluster', :js do
include GoogleApi::CloudPlatformHelpers include GoogleApi::CloudPlatformHelpers
let(:group) { create(:group) } let(:group) { create(:group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Container Registry', :js do RSpec.describe 'Container Registry', :js do
let(:user) { create(:user) } let(:user) { create(:user) }
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 'Group empty states' do RSpec.describe 'Group empty states' do
let(:group) { create(:group) } let(:group) { create(:group) }
let(:user) { create(:group_member, :developer, user: create(:user), group: group ).user } let(:user) { create(:group_member, :developer, user: create(:user), group: group ).user }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'The group page' do RSpec.describe 'The group page' do
include ExternalAuthorizationServiceHelpers include ExternalAuthorizationServiceHelpers
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Edit group settings' do RSpec.describe 'Edit group settings' do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:group) { create(:group, path: 'foo') } let(:group) { create(:group, path: 'foo') }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Group Export', :js do RSpec.describe 'Group Export', :js do
include ExportFileHelper include ExportFileHelper
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 'Group issues page' do RSpec.describe 'Group issues page' do
include FilteredSearchHelpers include FilteredSearchHelpers
include DragTo include DragTo
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Create a group label' do RSpec.describe 'Create a group label' 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 'Edit group label' do RSpec.describe 'Edit group label' do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:group) { create(:group) } let(:group) { create(:group) }
let(:label) { create(:group_label, group: group) } let(:label) { create(:group_label, group: group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Group labels' do RSpec.describe 'Group labels' do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:group) { create(:group) } let(:group) { create(:group) }
let!(:label) { create(:group_label, group: group) } let!(:label) { create(:group_label, group: group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Search for labels', :js do RSpec.describe 'Search for labels', :js do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:group) { create(:group) } let(:group) { create(:group) }
let!(:label1) { create(:group_label, title: 'Foo', description: 'Lorem ipsum', group: group) } let!(:label1) { create(:group_label, title: 'Foo', description: 'Lorem ipsum', group: group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Sort labels', :js do RSpec.describe 'Sort labels', :js do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:group) { create(:group) } let(:group) { create(:group) }
let!(:label1) { create(:group_label, title: 'Foo', description: 'Lorem ipsum', group: group) } let!(:label1) { create(:group_label, title: 'Foo', description: 'Lorem ipsum', group: group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Labels subscription' do RSpec.describe 'Labels subscription' do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:group) { create(:group) } let(:group) { create(:group) }
let!(:label1) { create(:group_label, group: group, title: 'foo') } let!(:label1) { create(:group_label, group: group, title: 'foo') }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Groups > Labels > User sees links to issuables' do RSpec.describe 'Groups > Labels > User sees links to issuables' do
let_it_be(:group) { create(:group, :public) } let_it_be(:group) { create(:group, :public) }
before do before do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Groups > Members > Filter members' do RSpec.describe 'Groups > Members > Filter members' do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:nested_group_user) { create(:user) } let(:nested_group_user) { create(:user) }
let(:user_with_2fa) { create(:user, :two_factor_via_otp) } let(:user_with_2fa) { create(:user, :two_factor_via_otp) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Groups > Members > Leave group' do RSpec.describe 'Groups > Members > Leave group' do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:other_user) { create(:user) } let(:other_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 > Members > List members' do RSpec.describe 'Groups > Members > List members' do
include Select2Helper include Select2Helper
include Spec::Support::Helpers::Features::ListRowsHelpers include Spec::Support::Helpers::Features::ListRowsHelpers
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Groups > Members > Manage groups', :js do RSpec.describe 'Groups > Members > Manage groups', :js do
include Select2Helper include Select2Helper
include Spec::Support::Helpers::Features::ListRowsHelpers include Spec::Support::Helpers::Features::ListRowsHelpers
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Groups > Members > Manage members' do RSpec.describe 'Groups > Members > Manage members' do
include Select2Helper include Select2Helper
include Spec::Support::Helpers::Features::ListRowsHelpers include Spec::Support::Helpers::Features::ListRowsHelpers
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'Groups > Members > Owner adds member with expiration date', :js do RSpec.describe 'Groups > Members > Owner adds member with expiration date', :js do
include Select2Helper include Select2Helper
include ActiveSupport::Testing::TimeHelpers include ActiveSupport::Testing::TimeHelpers
......
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.
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