Adjust for new static-analysis failures

This commit is contained in:
Bob Van Landuyt 2017-06-27 13:05:02 +02:00
parent 397d3fd7d0
commit 7c53fcf11f
2 changed files with 8 additions and 8 deletions

View file

@ -37,8 +37,8 @@ module Gitlab
def perform_rename(routable, old_full_path, new_full_path)
# skips callbacks & validations
new_path = new_full_path.split('/').last
routable.class.where(id: routable).
update_all(path: new_path)
routable.class.where(id: routable)
.update_all(path: new_path)
rename_routes(old_full_path, new_full_path)
end

View file

@ -55,9 +55,9 @@ describe Gitlab::Database::RenameReservedPathsMigration::V1, :truncate do
describe '#revert_renames' do
it 'renames namespaces' do
rename_namespaces = double
expect(described_class::RenameNamespaces).
to receive(:new).with([], subject).
and_return(rename_namespaces)
expect(described_class::RenameNamespaces)
.to receive(:new).with([], subject)
.and_return(rename_namespaces)
expect(rename_namespaces).to receive(:revert_renames)
subject.revert_renames
@ -65,9 +65,9 @@ describe Gitlab::Database::RenameReservedPathsMigration::V1, :truncate do
it 'renames projects' do
rename_projects = double
expect(described_class::RenameProjects).
to receive(:new).with([], subject).
and_return(rename_projects)
expect(described_class::RenameProjects)
.to receive(:new).with([], subject)
.and_return(rename_projects)
expect(rename_projects).to receive(:revert_renames)
subject.revert_renames