Commit c453836d authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix rubocop offences after merge from CE

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 32620938
......@@ -49,10 +49,6 @@ class IssuableBaseService < BaseService
SystemNoteService.discussion_lock(issuable, current_user)
end
def create_discussion_lock_note(issuable)
SystemNoteService.discussion_lock(issuable, current_user)
end
def filter_params(issuable)
ability_name = :"admin_#{issuable.to_ability_name}"
......
......@@ -215,7 +215,7 @@ describe Projects::MirrorsController do
end
end
describe '#ssh_host_keys', use_clean_rails_memory_store_caching: true do
describe '#ssh_host_keys', :use_clean_rails_memory_store_caching do
let(:project) { create(:project) }
let(:cache) { SshHostKey.new(project: project, url: "ssh://example.com:22") }
......
......@@ -48,7 +48,7 @@ describe SshHostKey do
subject(:ssh_host_key) { described_class.new(project: project, url: 'ssh://example.com:2222') }
describe '#fingerprints', use_clean_rails_memory_store_caching: true do
describe '#fingerprints', :use_clean_rails_memory_store_caching do
it 'returns an array of indexed fingerprints when the cache is filled' do
stub_reactive_cache(ssh_host_key, known_hosts: known_hosts)
......@@ -65,7 +65,7 @@ describe SshHostKey do
end
end
describe '#fingerprints', use_clean_rails_memory_store_caching: true do
describe '#fingerprints', :use_clean_rails_memory_store_caching do
it 'returns an array of indexed fingerprints when the cache is filled' do
stub_reactive_cache(ssh_host_key, known_hosts: known_hosts)
......
......@@ -151,7 +151,7 @@ feature 'Project mirror', :js do
end
end
describe 'host key management', use_clean_rails_memory_store_caching: true do
describe 'host key management', :use_clean_rails_memory_store_caching do
let(:key) { Gitlab::SSHPublicKey.new(SSHKeygen.generate) }
let(:cache) { SshHostKey.new(project: project, url: "ssh://example.com:22") }
......
require 'spec_helper'
feature 'Project remote mirror', feature: true do
feature 'Project remote mirror', :feature do
let(:project) { create(:project, :repository, :remote_mirror) }
let(:remote_mirror) { project.remote_mirrors.first }
let(:user) { create(:user) }
......
......@@ -259,13 +259,13 @@ describe Repository do
it_behaves_like 'finding commits by message'
end
describe 'when storage is broken', :broken_storage do
describe 'when storage is broken', :broken_storage do
it 'should raise a storage error' do
expect_to_raise_storage_error { broken_repository.find_commits_by_message('s') }
end
end
describe 'when storage is broken', broken_storage: true do
describe 'when storage is broken', :broken_storage do
it 'should raise a storage error' do
expect_to_raise_storage_error { broken_repository.find_commits_by_message('s') }
end
......@@ -1569,7 +1569,7 @@ describe Repository do
end
end
describe "Elastic search", elastic: true do
describe "Elastic search", :elastic do
before do
stub_application_setting(elasticsearch_search: true, elasticsearch_indexing: true)
Gitlab::Elastic::Helper.create_empty_index
......
......@@ -28,7 +28,7 @@ describe Projects::UpdateRepositoryStorageService do
FileUtils.rm_rf('tmp/tests/storage_b')
end
context 'without wiki', skip_gitaly_mock: true do
context 'without wiki', :skip_gitaly_mock do
let(:project) { create(:project, :repository, repository_storage: 'a', repository_read_only: true, wiki_enabled: false) }
context 'when the move succeeds' do
......@@ -64,7 +64,7 @@ describe Projects::UpdateRepositoryStorageService do
end
end
context 'with wiki', skip_gitaly_mock: true do
context 'with wiki', :skip_gitaly_mock do
let(:project) { create(:project, :repository, repository_storage: 'a', repository_read_only: true, wiki_enabled: true) }
before do
......
......@@ -219,13 +219,13 @@ describe Projects::UpdateService, '#execute' do
FileUtils.rm_rf('tmp/tests/storage_b')
end
it 'calls the change repository storage method if the storage changed', skip_gitaly_mock: true do
it 'calls the change repository storage method if the storage changed', :skip_gitaly_mock do
expect(project).to receive(:change_repository_storage).with('b')
update_project(project, admin_user, opts).inspect
end
it "doesn't call the change repository storage for non-admin users", skip_gitaly_mock: true do
it "doesn't call the change repository storage for non-admin users", :skip_gitaly_mock do
expect(project).not_to receive(:change_repository_storage)
update_project(project, user, opts).inspect
......
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