Commit b58c01e2 authored by Valery Sizov's avatar Valery Sizov

rubocop fix

parent e05fd55e
......@@ -7,7 +7,6 @@ class Projects::MirrorsController < Projects::ApplicationController
layout "project_settings"
def show
end
def update
......
......@@ -34,7 +34,6 @@ class ProjectTeam
end
def add_users(users, access, current_user = nil)
return false if group_member_lock
ProjectMember.add_users_to_projects(
......
......@@ -3,7 +3,6 @@ module Ci
attr_reader :pipeline
def execute(ignore_skip_ci: false, save_on_errors: true, trigger_request: nil, mirror_update: false)
@pipeline = Ci::Pipeline.new(
project: project,
ref: ref,
......
......@@ -33,7 +33,6 @@ module Oauth2
Doorkeeper::AccessToken.by_token(logout_token)
end
end
end
end
......@@ -8,7 +8,6 @@ class Spinach::Features::GroupsManagement < Spinach::FeatureSteps
step '"Open" is in group "Sourcing"' do
@group = Group.find_by(name: "Sourcing")
@project ||= create(:project, name: "Open", namespace: @group)
end
step '"Mary Jane" has master access for project "Open"' do
......
......@@ -3,7 +3,6 @@ module API
before { authenticated_as_admin! }
resource :license do
# Get information on the currently active license
#
# Example request:
......
......@@ -13,6 +13,7 @@ feature 'Edit Merge Request', feature: true do
visit edit_namespace_project_merge_request_path(project.namespace, project, merge_request)
end
end
context 'editing a MR' do
it 'has class js-quick-submit in form' do
......
......@@ -34,5 +34,4 @@ feature 'Global elastic search', feature: true do
expect(page).to have_selector('.gl-pagination .page', count: 2)
end
end
end
......@@ -45,6 +45,5 @@ describe EE::Gitlab::LDAP::Group, lib: true do
)
)
end
end
end
......@@ -33,7 +33,6 @@ describe EE::Gitlab::LDAP::Sync::Groups, lib: true do
end
context 'when group_base is present' do
context 'and admin_group and external_groups are not present' do
before { stub_ldap_config(group_base: 'dc=example,dc=com') }
......
......@@ -26,6 +26,5 @@ describe Gitlab::GitAccessWiki, lib: true do
it { expect(subject.allowed?).to be_falsey }
end
end
end
end
require "spec_helper"
describe Gitlab::LDAP::Person do
describe "#kerberos_principal" do
let(:entry) do
ldif = "dn: cn=foo, dc=bar, dc=com\n"
ldif += "sAMAccountName: #{sam_account_name}\n" if sam_account_name
......@@ -13,7 +11,6 @@ describe Gitlab::LDAP::Person do
subject { Gitlab::LDAP::Person.new(entry, 'ldapmain') }
context "when sAMAccountName is not defined (non-AD LDAP server)" do
let(:sam_account_name) { nil }
it "returns nil" do
......@@ -22,7 +19,6 @@ describe Gitlab::LDAP::Person do
end
context "when sAMAccountName is defined (AD server)" do
let(:sam_account_name) { "mylogin" }
it "returns the principal combining sAMAccountName and DC components of the distinguishedName" do
......@@ -32,7 +28,6 @@ describe Gitlab::LDAP::Person do
end
describe "#ssh_keys" do
let(:ssh_key) { "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCrSQHff6a1rMqBdHFt+FwIbytMZ+hJKN3KLkTtOWtSvNIriGhnTdn4rs+tjD/w+z+revytyWnMDM9dS7J8vQi006B16+hc9Xf82crqRoPRDnBytgAFFQY1G/55ql2zdfsC5yvpDOFzuwIJq5dNGsojS82t6HNmmKPq130fzsenFnj5v1pl3OJvk513oduUyKiZBGTroWTn7H/eOPtu7s9MD7pAdEjqYKFLeaKmyidiLmLqQlCRj3Tl2U9oyFg4PYNc0bL5FZJ/Z6t0Ds3i/a2RanQiKxrvgu3GSnUKMx7WIX373baL4jeM7cprRGiOY/1NcS+1cAjfJ8oaxQF/1dYj" }
let(:ssh_key_attribute_name) { 'altSecurityIdentities' }
let(:entry) do
......@@ -46,7 +41,6 @@ describe Gitlab::LDAP::Person do
end
context "when the SSH key is literal" do
let(:keys) { "#{ssh_key_attribute_name}: #{ssh_key}" }
it "includes the SSH key" do
......@@ -55,7 +49,6 @@ describe Gitlab::LDAP::Person do
end
context "when the SSH key is prefixed" do
let(:keys) { "#{ssh_key_attribute_name}: SSHKey:#{ssh_key}" }
it "includes the SSH key" do
......@@ -64,7 +57,6 @@ describe Gitlab::LDAP::Person do
end
context "when the SSH key is suffixed" do
let(:keys) { "#{ssh_key_attribute_name}: #{ssh_key} (SSH key)" }
it "includes the SSH key" do
......@@ -73,7 +65,6 @@ describe Gitlab::LDAP::Person do
end
context "when the SSH key is followed by a newline" do
let(:keys) { "#{ssh_key_attribute_name}: #{ssh_key}\n" }
it "includes the SSH key" do
......@@ -82,7 +73,6 @@ describe Gitlab::LDAP::Person do
end
context "when the key is not an SSH key" do
let(:keys) { "#{ssh_key_attribute_name}: KerberosKey:bogus" }
it "is empty" do
......@@ -91,7 +81,6 @@ describe Gitlab::LDAP::Person do
end
context "when there are multiple keys" do
let(:keys) { "#{ssh_key_attribute_name}: #{ssh_key}\n#{ssh_key_attribute_name}: KerberosKey:bogus\n#{ssh_key_attribute_name}: ssh-rsa keykeykey" }
it "includes both SSH keys" do
......
......@@ -150,7 +150,7 @@ describe Ci::Pipeline, models: true do
commit_status.success
end
ends
end
context 'updates' do
let(:current) { Time.now.change(usec: 0) }
......
......@@ -105,7 +105,6 @@ describe License do
it "is valid" do
expect(license).not_to be_valid
end
end
context "when the license has yet to expire" do
......@@ -261,5 +260,4 @@ describe License do
build(:license, data: gl_license.export)
end
end
end
......@@ -176,7 +176,6 @@ describe JenkinsService do
expect(@jenkins_service.password).to eq('password')
expect(@jenkins_service.jenkins_url).to eq('http://jenkins_edited.example.com/')
end
end
end
end
......@@ -1187,7 +1187,6 @@ describe Project, models: true do
expect(project.reload.import_url).to eq('http://test.com')
end
end
end
describe '#protected_branch?' do
......@@ -1362,7 +1361,6 @@ describe Project, models: true do
end
describe 'Project import job' do
let(:project) { create(:empty_project) }
let(:mirror) { false }
......
......@@ -1370,5 +1370,4 @@ describe Repository, models: true do
rugged = repository.rugged
rugged.references.create("refs/remotes/#{remote_name}/#{branch_name}", target.id)
end
end
......@@ -159,5 +159,4 @@ describe API::API, api: true do
end
end
end
end
......@@ -17,5 +17,4 @@ describe PathLocks::LockService, services: true do
described_class.new(project, current_user).execute(path)
end.to raise_exception(PathLocks::LockService::AccessDenied)
end
end
......@@ -20,5 +20,4 @@ describe PathLocks::UnlockService, services: true do
described_class.new(project, user).execute(path_lock)
end.to raise_exception(PathLocks::UnlockService::AccessDenied)
end
end
......@@ -122,7 +122,6 @@ describe Projects::UpdateRemoteMirrorService do
end
end
end
end
def create_branch(repository, branch_name)
......
require 'spec_helper'
describe Projects::UpdateRepositoryStorageService, services: true do
subject { described_class.new(project) }
describe "#execute" do
......
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