Enable Style/EmptyLines cop, remove redundant ones

This commit is contained in:
Grzegorz Bizon 2016-07-01 21:56:17 +02:00
parent b227355973
commit 9e211091a8
162 changed files with 1 additions and 238 deletions

View file

@ -193,7 +193,7 @@ Style/EmptyLineBetweenDefs:
# Don't use several empty lines in a row.
Style/EmptyLines:
Enabled: false
Enabled: true
# Keep blank lines around access modifiers.
Style/EmptyLinesAroundAccessModifier:

View file

@ -22,7 +22,6 @@ class Admin::HooksController < Admin::ApplicationController
redirect_to admin_hooks_path
end
def test
@hook = SystemHook.find(params[:hook_id])
data = {

View file

@ -1,5 +1,4 @@
class ConfirmationsController < Devise::ConfirmationsController
def almost_there
flash[:notice] = nil
render layout: "devise_empty"

View file

@ -1,5 +1,4 @@
class Import::BaseController < ApplicationController
private
def get_or_create_namespace

View file

@ -5,7 +5,6 @@ class Import::FogbugzController < Import::BaseController
rescue_from Fogbugz::AuthenticationException, with: :fogbugz_unauthorized
def new
end
def callback
@ -22,7 +21,6 @@ class Import::FogbugzController < Import::BaseController
end
def new_user_map
end
def create_user_map

View file

@ -44,5 +44,4 @@ class Import::GitoriousController < Import::BaseController
def verify_gitorious_import_enabled
render_404 unless gitorious_import_enabled?
end
end

View file

@ -3,7 +3,6 @@ class Import::GoogleCodeController < Import::BaseController
before_action :user_map, only: [:new_user_map, :create_user_map]
def new
end
def callback
@ -34,7 +33,6 @@ class Import::GoogleCodeController < Import::BaseController
end
def new_user_map
end
def create_user_map

View file

@ -5,7 +5,6 @@ class InvitesController < ApplicationController
respond_to :html
def show
end
def accept

View file

@ -76,7 +76,6 @@ class Projects::IssuesController < Projects::ApplicationController
render json: @issue.to_json(include: [:milestone, :labels])
end
end
end
def create

View file

@ -7,7 +7,6 @@ class Projects::NetworkController < Projects::ApplicationController
before_action :authorize_download_code!
def show
@url = namespace_project_network_path(@project.namespace, @project, @ref, @options.merge(format: :json))
@commit_url = namespace_project_commit_path(@project.namespace, @project, 'ae45ca32').gsub("ae45ca32", "%s")

View file

@ -124,5 +124,4 @@ class Projects::WikisController < Projects::ApplicationController
def wiki_params
params[:wiki].slice(:title, :content, :format, :message)
end
end

View file

@ -1,5 +1,4 @@
module EmailsHelper
# Google Actions
# https://developers.google.com/gmail/markup/reference/go-to-action
def email_action(url)

View file

@ -1,5 +1,4 @@
module IssuablesHelper
def sidebar_gutter_toggle_icon
sidebar_gutter_collapsed? ? icon('angle-double-left') : icon('angle-double-right')
end

View file

@ -1,5 +1,4 @@
module SearchHelper
def search_autocomplete_opts(term)
return unless current_user

View file

@ -58,7 +58,6 @@ module Issuable
scope :references_project, -> { references(:project) }
scope :non_archived, -> { join_project.where(projects: { archived: false }) }
delegate :name,
:email,
to: :author,

View file

@ -15,7 +15,6 @@ class ProjectMember < Member
before_destroy :delete_member_todos
class << self
# Add users to project teams with passed access option
#
# access can be an integer representing a access code

View file

@ -1,5 +1,4 @@
class BugzillaService < IssueTrackerService
prop_accessor :title, :description, :project_url, :issues_url, :new_issue_url
def title
@ -21,5 +20,4 @@ class BugzillaService < IssueTrackerService
def to_param
'bugzilla'
end
end

View file

@ -1,5 +1,4 @@
class CustomIssueTrackerService < IssueTrackerService
prop_accessor :title, :description, :project_url, :issues_url, :new_issue_url
def title
@ -31,5 +30,4 @@ class CustomIssueTrackerService < IssueTrackerService
{ type: 'text', name: 'new_issue_url', placeholder: 'New Issue url' }
]
end
end

View file

@ -1,5 +1,4 @@
class DroneCiService < CiService
prop_accessor :drone_url, :token, :enable_ssl_verification
validates :drone_url, presence: true, url: true, if: :activated?

View file

@ -1,5 +1,4 @@
class IssueTrackerService < Service
validates :project_url, :issues_url, :new_issue_url, presence: true, url: true, if: :activated?
default_value_for :category, 'issue_tracker'

View file

@ -190,7 +190,6 @@ class JiraService < IssueTrackerService
end
end
def auth
require 'base64'
Base64.urlsafe_encode64("#{self.username}:#{self.password}")

View file

@ -1,5 +1,4 @@
class RedmineService < IssueTrackerService
prop_accessor :title, :description, :project_url, :issues_url, :new_issue_url
def title

View file

@ -875,7 +875,6 @@ class Repository
merge_base(ancestor_id, descendant_id) == ancestor_id
end
def search_files(query, ref)
offset = 2
args = %W(#{Gitlab.config.git.bin_path} grep -i -I -n --before-context #{offset} --after-context #{offset} -E -e #{Regexp.escape(query)} #{ref || root_ref})

View file

@ -852,7 +852,6 @@ class User < ActiveRecord::Base
projects.select(:id),
groups.joins(:shared_projects).select(:project_id)]
if min_access_level
scope = { access_level: Gitlab::Access.values.select { |access| access >= min_access_level } }
relations = [relations.shift] + relations.map { |relation| relation.where(members: scope) }

View file

@ -2,7 +2,6 @@ require_relative 'base_service'
class CreateReleaseService < BaseService
def execute(tag_name, release_description)
repository = project.repository
existing_tag = repository.find_tag(tag_name)

View file

@ -1,6 +1,5 @@
module Issues
class BaseService < ::IssuableBaseService
def hook_data(issue, action)
issue_data = issue.to_hook_data(current_user)
issue_url = Gitlab::UrlBuilder.build(issue)

View file

@ -1,6 +1,5 @@
module MergeRequests
class BaseService < ::IssuableBaseService
def create_note(merge_request)
SystemNoteService.change_status(merge_request, merge_request.target_project, current_user, merge_request.state, nil)
end

View file

@ -40,6 +40,5 @@ module MergeRequests
error("Can't cancel the automatic merge", 406)
end
end
end
end

View file

@ -1,7 +1,6 @@
module Milestones
class DestroyService < Milestones::BaseService
def execute(milestone)
Milestone.transaction do
update_params = { milestone: nil }

View file

@ -1,6 +1,5 @@
module Projects
class DownloadService < BaseService
WHITELIST = [
/^[^.]+\.fogbugz.com$/
]

View file

@ -1,7 +1,6 @@
module Projects
module ImportExport
class ExportService < BaseService
def execute(_options = {})
@shared = Gitlab::ImportExport::Shared.new(relative_path: File.join(project.path_with_namespace, 'work'))
save_all

View file

@ -293,7 +293,6 @@ class SystemNoteService
end
end
def self.cross_reference?(note_text)
note_text.start_with?(cross_reference_note_prefix)
end

View file

@ -2,7 +2,6 @@ require_relative 'base_service'
class UpdateReleaseService < BaseService
def execute(tag_name, release_description)
repository = project.repository
existing_tag = repository.find_tag(tag_name)

View file

@ -1,6 +1,5 @@
module WikiPages
class BaseService < ::BaseService
def hook_data(page, action)
hook_data = {
object_kind: page.class.name.underscore,

View file

@ -96,7 +96,6 @@ class Settings < Settingslogic
end
end
# Default settings
Settings['ldap'] ||= Settingslogic.new({})
Settings.ldap['enabled'] = false if Settings.ldap['enabled'].nil?
@ -124,7 +123,6 @@ if Settings.ldap['enabled'] || Rails.env.test?
end
end
Settings['omniauth'] ||= Settingslogic.new({})
Settings.omniauth['enabled'] = false if Settings.omniauth['enabled'].nil?
Settings.omniauth['auto_sign_in_with_provider'] = false if Settings.omniauth['auto_sign_in_with_provider'].nil?
@ -218,7 +216,6 @@ Settings.gitlab['restricted_signup_domains'] ||= []
Settings.gitlab['import_sources'] ||= %w[github bitbucket gitlab gitorious google_code fogbugz git gitlab_project]
Settings.gitlab['trusted_proxies'] ||= []
#
# CI
#
@ -348,7 +345,6 @@ Settings.git['timeout'] ||= 10
Settings['satellites'] ||= Settingslogic.new({})
Settings.satellites['path'] = File.expand_path(Settings.satellites['path'] || "tmp/repo_satellites/", Rails.root)
#
# Extra customization
#

View file

@ -133,7 +133,6 @@ Rails.application.routes.draw do
#
resources :notification_settings, only: [:create, :update]
#
# Import
#
@ -466,7 +465,6 @@ Rails.application.routes.draw do
resources :namespaces, path: '/', constraints: { id: /[a-zA-Z.0-9_\-]+/ }, only: [] do
resources(:projects, constraints: { id: /[a-zA-Z.0-9_\-]+(?<!\.atom)/ }, except:
[:new, :create, :index], path: "/") do
member do
put :transfer
delete :remove_fork

View file

@ -49,5 +49,4 @@ class Spinach::Features::NewProject < Spinach::FeatureSteps
step 'I redirected to Google Code import page' do
expect(current_path).to eq new_import_google_code_path
end
end

View file

@ -69,7 +69,6 @@ class Spinach::Features::ExploreProjects < Spinach::FeatureSteps
visit namespace_project_issues_path(public_project.namespace, public_project)
end
step 'I should see list of issues for "Community" project' do
expect(page).to have_content "Bug"
expect(page).to have_content public_project.name
@ -88,7 +87,6 @@ class Spinach::Features::ExploreProjects < Spinach::FeatureSteps
visit namespace_project_issues_path(internal_project.namespace, internal_project)
end
step 'I should see list of issues for "Internal" project' do
expect(page).to have_content "Internal Bug"
expect(page).to have_content internal_project.name
@ -137,7 +135,6 @@ class Spinach::Features::ExploreProjects < Spinach::FeatureSteps
@public_project ||= Project.find_by!(name: 'Community')
end
def internal_merge_request
@internal_merge_request ||= MergeRequest.find_by!(title: 'Feature implemented')
end

View file

@ -33,5 +33,4 @@ class Spinach::Features::ProjectArchived < Spinach::FeatureSteps
When 'I set project unarchived' do
click_link "Unarchive"
end
end

View file

@ -124,14 +124,12 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps
end
step 'project "Shop" has milestone "v2.2"' do
milestone = create(:milestone, title: "v2.2", project: project)
3.times { create(:issue, project: project, milestone: milestone) }
end
step 'project "Shop" has milestone "v3.0"' do
milestone = create(:milestone, title: "v3.0", project: project)
3.times { create(:issue, project: project, milestone: milestone) }
@ -147,7 +145,6 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps
end
When 'I select first assignee from "Shop" project' do
first_assignee = project.users.first
select first_assignee.name, from: "assignee_id"
end
@ -160,7 +157,6 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps
end
step 'project "Shop" have "Release 0.4" open issue' do
create(:issue,
title: "Release 0.4",
project: project,
@ -360,5 +356,4 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps
def filter_issue(text)
fill_in 'issue_search', with: text
end
end

View file

@ -66,7 +66,6 @@ class Spinach::Features::ProjectFindFile < Spinach::FeatureSteps
expect(page).not_to have_content(".gitignore")
end
def find_file(text)
fill_in 'file_find', with: text
end

View file

@ -189,5 +189,4 @@ module SharedIssuable
expect(page).to have_content content
end
end
end

View file

@ -52,5 +52,4 @@ class Spinach::Features::SnippetSearch < Spinach::FeatureSteps
step 'I should not see "Personal snippet private" in results' do
expect(page).not_to have_content 'Personal snippet private'
end
end

View file

@ -11,7 +11,6 @@ module API
[ ":id/#{awardable_string}/:#{awardable_id_string}/award_emoji",
":id/#{awardable_string}/:#{awardable_id_string}/notes/:note_id/award_emoji"
].each do |endpoint|
# Get a list of project +awardable+ award emoji
#
# Parameters:

View file

@ -40,7 +40,6 @@ module API
# PUT /projects/:id/repository/branches/:branch/protect
put ':id/repository/branches/:branch/protect',
requirements: { branch: /.+/ } do
authorize_admin_project
@branch = user_project.repository.find_branch(params[:branch])
@ -60,7 +59,6 @@ module API
# PUT /projects/:id/repository/branches/:branch/unprotect
put ':id/repository/branches/:branch/unprotect',
requirements: { branch: /.+/ } do
authorize_admin_project
@branch = user_project.repository.find_branch(params[:branch])

View file

@ -13,7 +13,6 @@ module API
# Example Request:
# GET /projects/:id/builds
get ':id/builds' do
builds = user_project.builds.order('id DESC')
builds = filter_builds(builds, params[:scope])

View file

@ -115,7 +115,6 @@ module API
issues = IssuesFinder.new(current_user, finder_params).execute
present paginate(issues), with: Entities::Issue, current_user: current_user
end
end
end
end

View file

@ -28,7 +28,6 @@ module API
present @hook, with: Entities::ProjectHook
end
# Add hook to project
#
# Parameters:

View file

@ -4,7 +4,6 @@ module API
before { authenticate! }
resource :projects do
# Get a project team members
#
# Parameters:

View file

@ -341,7 +341,6 @@ module API
else
not_found!("Source Project")
end
end
# Remove a forked_from relationship
@ -418,7 +417,6 @@ module API
present paginate(projects), with: Entities::Project
end
# Get a users list
#
# Example Request:

View file

@ -4,7 +4,6 @@ module API
before { authenticate! }
before { authorize_admin_project }
resource :projects do
# Set <service_slug> service for project
#

View file

@ -8,7 +8,6 @@ module Banzai
# of the anchor, and then replace the img with the link-wrapped version.
def call
doc.xpath('descendant-or-self::img[not(ancestor::a)]').each do |img|
div = doc.document.create_element(
'div',
class: 'image-container'

View file

@ -8,7 +8,6 @@ module Banzai
# Context options:
# :project_wiki
class WikiLinkFilter < HTML::Pipeline::Filter
def call
return doc unless project_wiki?

View file

@ -1,7 +1,6 @@
module Banzai
module Pipeline
class FullPipeline < CombinedPipeline.new(PlainMarkdownPipeline, GfmPipeline)
end
end
end

View file

@ -13,7 +13,6 @@ module Ci
collect
end
def push(from, to, format)
@labels << from.strftime(format)
@total << project.builds.

View file

@ -1,6 +1,5 @@
# Read about interceptors in http://guides.rubyonrails.org/action_mailer_basics.html#intercepting-emails
class DisableEmailInterceptor
def self.delivering_email(message)
message.perform_deliveries = false
Rails.logger.info "Emails disabled! Interceptor prevented sending mail #{message.subject}"

View file

@ -4,7 +4,6 @@ module Gitlab
# Parser/renderer for the AsciiDoc format that uses Asciidoctor and filters
# the resulting HTML through HTML pipeline filters.
module Asciidoc
DEFAULT_ADOC_ATTRS = [
'showtitle', 'idprefix=user-content-', 'idseparator=-', 'env=gitlab',
'env-gitlab', 'source-highlighter=html-pipeline'

View file

@ -8,7 +8,6 @@ module Grack
end
class Auth < Rack::Auth::Basic
attr_accessor :user, :project, :env
def call(env)

View file

@ -40,7 +40,6 @@ module Gitlab
line_obj_index += 1
end
case line[0]
when "+"
line_new += 1

View file

@ -1,7 +1,6 @@
module Gitlab
module ImportExport
class Importer
def initialize(project)
@archive_file = project.import_source
@current_user = project.creator

View file

@ -1,7 +1,6 @@
module Gitlab
module ImportExport
class MembersMapper
attr_reader :missing_author_ids
def initialize(exported_members:, user:, project:)

View file

@ -1,7 +1,6 @@
module Gitlab
module ImportExport
class ProjectCreator
def initialize(namespace_id, current_user, file, project_path)
@namespace_id = namespace_id
@current_user = current_user

View file

@ -1,7 +1,6 @@
module Gitlab
module ImportExport
class ProjectTreeRestorer
def initialize(user:, shared:, project:)
@path = File.join(shared.export_path, 'project.json')
@user = user

View file

@ -1,7 +1,6 @@
module Gitlab
module ImportExport
class Reader
attr_reader :tree
def initialize(shared:)
@ -55,7 +54,6 @@ module Gitlab
@json_config_hash
end
# If the model is a hash, process the sub_models, which could also be hashes
# If there is a list, add to an existing array, otherwise use hash syntax
# +current_key+ main model that will be a key in the hash

View file

@ -1,7 +1,6 @@
module Gitlab
module ImportExport
class RelationFactory
OVERRIDES = { snippets: :project_snippets,
pipelines: 'Ci::Pipeline',
statuses: 'commit_status',

View file

@ -1,7 +1,6 @@
module Gitlab
module ImportExport
class Shared
attr_reader :errors, :opts
def initialize(opts)

View file

@ -1,7 +1,6 @@
module Gitlab
module ImportExport
class UploadsSaver
def initialize(project:, shared:)
@project = project
@shared = shared

View file

@ -1,7 +1,6 @@
module Gitlab
module ImportExport
class VersionChecker
def self.check!(*args)
new(*args).check!
end

View file

@ -1,7 +1,6 @@
module Gitlab
module ImportExport
class VersionSaver
def initialize(shared:)
@shared = shared
end

View file

@ -24,8 +24,6 @@ module Gitlab
'GitLab export' => 'gitlab_project'
}
end
end
end
end

View file

@ -1,7 +1,6 @@
module Gitlab
module Lfs
class Response
def initialize(project, user, ci, request)
@origin_project = project
@project = storage_project(project)

View file

@ -1,7 +1,6 @@
module Gitlab
# Parser/renderer for markups without other special support code.
module OtherMarkup
# Public: Converts the provided markup into HTML.
#
# input - the source text in a markup format

View file

@ -13,7 +13,6 @@ module Gitlab
"Cannot start with '-' or end in '.'." \
end
def namespace_name_regex
@namespace_name_regex ||= /\A[\p{Alnum}\p{Pd}_\. ]*\z/.freeze
end
@ -22,7 +21,6 @@ module Gitlab
"can contain only letters, digits, '_', '.', dash and space."
end
def project_name_regex
@project_name_regex ||= /\A[\p{Alnum}_][\p{Alnum}\p{Pd}_\. ]*\z/.freeze
end
@ -32,7 +30,6 @@ module Gitlab
"It must start with letter, digit or '_'."
end
def project_path_regex
@project_path_regex ||= /\A[a-zA-Z0-9_.][a-zA-Z0-9_\-\.]*(?<!\.git|\.atom)\z/.freeze
end
@ -42,7 +39,6 @@ module Gitlab
"Cannot start with '-', end in '.git' or end in '.atom'" \
end
def file_name_regex
@file_name_regex ||= /\A[a-zA-Z0-9_\-\.\@]*\z/.freeze
end
@ -59,7 +55,6 @@ module Gitlab
"can contain only letters, digits, '_', '-', '@' and '.'. Separate directories with a '/'. "
end
def directory_traversal_regex
@directory_traversal_regex ||= /\.{2}/.freeze
end
@ -68,7 +63,6 @@ module Gitlab
"cannot include directory traversal. "
end
def archive_formats_regex
# |zip|tar| tar.gz | tar.bz2 |
@archive_formats_regex ||= /(zip|tar|tar\.gz|tgz|gz|tar\.bz2|tbz|tbz2|tb2|bz2)/.freeze

View file

@ -1,7 +1,6 @@
module Gitlab
module Saml
class AuthHash < Gitlab::OAuth::AuthHash
def groups
get_raw(Gitlab::Saml::Config.groups)
end
@ -13,7 +12,6 @@ module Gitlab
# otherwise just the first value is returned
auth_hash.extra[:raw_info].all[key]
end
end
end
end

View file

@ -1,7 +1,6 @@
module Gitlab
module Saml
class Config
class << self
def options
Gitlab.config.omniauth.providers.find { |provider| provider.name == 'saml' }
@ -15,7 +14,6 @@ module Gitlab
options[:external_groups]
end
end
end
end
end

View file

@ -6,7 +6,6 @@
module Gitlab
module Saml
class User < Gitlab::OAuth::User
def save
super('SAML')
end

View file

@ -3,7 +3,6 @@ require "fileutils"
# Taken from: Rack::Test::UploadedFile
class UploadedFile
# The filename, *not* including the path, of the "uploaded" file
attr_reader :original_filename

View file

@ -49,7 +49,6 @@ describe ApplicationController do
end
end
context "when the 'PRIVATE-TOKEN' header is populated with the private token" do
it "logs the user in" do
@request.headers['PRIVATE-TOKEN'] = user.private_token

View file

@ -1,7 +1,6 @@
require 'spec_helper'
describe Profiles::AccountsController do
let(:user) { create(:omniauth_user, provider: 'saml') }
before do

View file

@ -68,7 +68,6 @@ describe Projects::BranchesController do
let(:branch) { "1-feature-branch" }
let!(:issue) { create(:issue, project: project) }
it 'redirects' do
post :create,
namespace_id: project.namespace.to_param,
@ -89,7 +88,6 @@ describe Projects::BranchesController do
branch_name: branch,
issue_iid: issue.iid
end
end
end

View file

@ -64,9 +64,7 @@ describe Projects::ForksController do
expect(assigns[:forks]).to be_present
end
end
end
end
end
end

View file

@ -18,7 +18,6 @@ describe Projects::LabelsController do
15.times { |i| create_label(priority: (i % 3) + 1, title: "label #{15 - i}") }
5.times { |i| create_label(title: "label #{100 - i}") }
get :index, namespace_id: project.namespace.to_param, project_id: project.to_param
end

View file

@ -117,7 +117,6 @@ describe Projects::MergeRequestsController do
end
context 'when filtering by opened state' do
context 'with opened merge requests' do
it 'should list those merge requests' do
get_merge_requests
@ -138,7 +137,6 @@ describe Projects::MergeRequestsController do
expect(assigns(:merge_requests)).to include(merge_request)
end
end
end
end

View file

@ -28,7 +28,6 @@ describe Projects::RepositoriesController do
end
context "when the service raises an error" do
before do
allow(Gitlab::Workhorse).to receive(:send_git_archive).and_raise("Archive failed")
end

View file

@ -66,7 +66,6 @@ describe Projects::TreeController do
let(:id) { '6d39438/.gitignore' }
it { expect(response).to have_http_status(302) }
end
end
describe 'GET show with blob path' do

View file

@ -89,15 +89,12 @@ describe ProjectsController do
expect(response).to redirect_to("/#{public_project.path_with_namespace}")
end
# MySQL queries are case insensitive by default, so this spec would fail.
if Gitlab::Database.postgresql?
context "when there is also a match with the same casing" do
let!(:other_project) { create(:project, :public, namespace: public_project.namespace, path: public_project.path.upcase) }
it "loads the exactly matched project" do
get :show, namespace_id: public_project.namespace.path, id: public_project.path.upcase
expect(assigns(:project)).to eq(other_project)

View file

@ -64,7 +64,6 @@ describe UsersController do
end
describe 'GET #calendar' do
it 'renders calendar' do
sign_in(user)

View file

@ -6,7 +6,6 @@ describe "Admin::Hooks", feature: true do
login_as :admin
@system_hook = create(:system_hook)
end
describe "GET /admin/hooks" do
@ -49,5 +48,4 @@ describe "Admin::Hooks", feature: true do
it { expect(current_path).to eq(admin_hooks_path) }
end
end

View file

@ -1,7 +1,6 @@
require 'spec_helper'
describe "Dashboard > User filters projects", feature: true do
describe 'filtering personal projects' do
before do
user = create(:user)

View file

@ -81,7 +81,6 @@ describe "GitLab Flavored Markdown", feature: true do
end
end
describe "for merge requests" do
before do
@merge_request = create(:merge_request, source_project: project, target_project: project, title: "fix #{issue.to_reference}")
@ -100,7 +99,6 @@ describe "GitLab Flavored Markdown", feature: true do
end
end
describe "for milestones" do
before do
@milestone = create(:milestone,

View file

@ -39,7 +39,6 @@ feature 'Groups > Members > Owner manages access requests', feature: true do
expect(ActionMailer::Base.deliveries.last.subject).to match "Access to the #{group.name} group was denied"
end
def expect_visible_access_request(group, user)
expect(group.members.request.exists?(user_id: user)).to be_truthy
expect(page).to have_content "#{group.name} access requests 1"

View file

@ -14,7 +14,6 @@ describe 'Filter issues', feature: true do
end
describe 'Filter issues for assignee from issues#index' do
before do
visit namespace_project_issues_path(project.namespace, project)
@ -36,7 +35,6 @@ describe 'Filter issues', feature: true do
expect(find('.js-assignee-search .dropdown-toggle-text')).to have_content(user.name)
end
it 'should not change when all link is clicked' do
find('.issues-state-filters a', text: "All").click
@ -46,7 +44,6 @@ describe 'Filter issues', feature: true do
end
describe 'Filter issues for milestone from issues#index' do
before do
visit namespace_project_issues_path(project.namespace, project)
@ -68,7 +65,6 @@ describe 'Filter issues', feature: true do
expect(find('.js-milestone-select .dropdown-toggle-text')).to have_content(milestone.title)
end
it 'should not change when all link is clicked' do
find('.issues-state-filters a', text: "All").click
@ -113,7 +109,6 @@ describe 'Filter issues', feature: true do
end
describe 'Filter issues for assignee and label from issues#index' do
before do
visit namespace_project_issues_path(project.namespace, project)
@ -144,7 +139,6 @@ describe 'Filter issues', feature: true do
expect(find('.js-label-select .dropdown-toggle-text')).to have_content(label.title)
end
it 'should not change when all link is clicked' do
find('.issues-state-filters a', text: "All").click

View file

@ -361,7 +361,6 @@ describe 'Issues', feature: true do
let(:issue) { create(:issue, project: project, author: @user, assignee: @user) }
context 'by authorized user' do
it 'allows user to select unassigned', js: true do
visit namespace_project_issue_path(project.namespace, project, issue)
@ -420,7 +419,6 @@ describe 'Issues', feature: true do
end
context 'by unauthorized user' do
let(:guest) { create(:user) }
before do
@ -442,8 +440,6 @@ describe 'Issues', feature: true do
let!(:milestone) { create(:milestone, project: project) }
context 'by authorized user' do
it 'allows user to select unassigned', js: true do
visit namespace_project_issue_path(project.namespace, project, issue)

View file

@ -20,7 +20,6 @@ feature 'project commit builds' do
visit builds_namespace_project_commit_path(project.namespace,
project, project.commit.sha)
expect(page).to have_content('Builds')
end
end

View file

@ -5,7 +5,6 @@ describe 'Cherry-pick Commits' do
let(:master_pickable_commit) { project.commit('7d3b0f7cff5f37573aea97cebfd5692ea1689924') }
let(:master_pickable_merge) { project.commit('e56497bb5f03a90a51293fc6d516788730953899') }
before do
login_as :user
project.team << [@user, :master]

View file

@ -1,7 +1,6 @@
require 'spec_helper'
feature 'Issue prioritization', feature: true do
let(:user) { create(:user) }
let(:project) { create(:project, name: 'test', namespace: user.namespace) }
@ -15,7 +14,6 @@ feature 'Issue prioritization', feature: true do
# According to https://gitlab.com/gitlab-org/gitlab-ce/issues/14189#note_4360653
context 'when issues have one label' do
scenario 'Are sorted properly' do
# Issues
issue_1 = create(:issue, title: 'issue_1', project: project)
issue_2 = create(:issue, title: 'issue_2', project: project)
@ -46,7 +44,6 @@ feature 'Issue prioritization', feature: true do
context 'when issues have multiple labels' do
scenario 'Are sorted properly' do
# Issues
issue_1 = create(:issue, title: 'issue_1', project: project)
issue_2 = create(:issue, title: 'issue_2', project: project)

View file

@ -48,9 +48,7 @@ describe "Search", feature: true do
end
end
describe 'Right header search field', feature: true do
describe 'Search in project page' do
before do
visit namespace_project_path(project.namespace, project)
@ -73,7 +71,6 @@ describe "Search", feature: true do
end
context 'click the links in the category search dropdown', js: true do
before do
page.find('#search').click
end
@ -124,6 +121,4 @@ describe "Search", feature: true do
end
end
end
end

View file

@ -76,7 +76,6 @@ describe 'Internal Group access', feature: true do
it { is_expected.to be_denied_for :visitor }
end
describe 'GET /groups/:path/group_members' do
subject { group_group_members_path(group) }

View file

@ -76,7 +76,6 @@ describe 'Private Group access', feature: true do
it { is_expected.to be_denied_for :visitor }
end
describe 'GET /groups/:path/group_members' do
subject { group_group_members_path(group) }

View file

@ -76,7 +76,6 @@ describe 'Public Group access', feature: true do
it { is_expected.to be_allowed_for :visitor }
end
describe 'GET /groups/:path/group_members' do
subject { group_group_members_path(group) }

Some files were not shown because too many files have changed in this diff Show more