Commit 7c53fcf1 authored by Bob Van Landuyt's avatar Bob Van Landuyt

Adjust for new static-analysis failures

parent 397d3fd7
......@@ -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
......
......@@ -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
......
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