Fix failing spec with orphaned namespace

This commit is contained in:
Toon Claes 2019-01-09 21:52:57 +01:00
parent d3e028b85f
commit 082cc12225
2 changed files with 2 additions and 2 deletions

View File

@ -101,7 +101,7 @@ module Gitlab
# Route model
class Route < ActiveRecord::Base
belongs_to :source, inverse_of: :route
belongs_to :source, inverse_of: :route, polymorphic: true
end
# Namespace model

View File

@ -95,7 +95,7 @@ describe Gitlab::BackgroundMigration::BackfillProjectRepositories do
project.route.destroy
subgroup.route.destroy
expect { project.disk_path }
expect { project.reload.disk_path }
.to raise_error(Gitlab::BackgroundMigration::BackfillProjectRepositories::OrphanedNamespaceError)
end
end