diff options
author | Bob Van Landuyt <bob@gitlab.com> | 2017-06-12 12:03:28 +0300 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2017-06-26 18:49:30 +0300 |
commit | c98ed42d01d4a15ce2a588079601b7d620b029ff (patch) | |
tree | cccc3b845de9636f2c9ab302b5775866492b9f78 /spec/lib | |
parent | 152cba56e4004de1b1c2accee77e40a019d8c667 (diff) |
Revert renames from a migration
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/gitlab/database/rename_reserved_paths_migration/v1_spec.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/lib/gitlab/database/rename_reserved_paths_migration/v1_spec.rb b/spec/lib/gitlab/database/rename_reserved_paths_migration/v1_spec.rb index 1d5e58855c1..9a48bc3a048 100644 --- a/spec/lib/gitlab/database/rename_reserved_paths_migration/v1_spec.rb +++ b/spec/lib/gitlab/database/rename_reserved_paths_migration/v1_spec.rb @@ -51,4 +51,26 @@ describe Gitlab::Database::RenameReservedPathsMigration::V1, :truncate do subject.rename_root_paths('the-path') end end + + 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(rename_namespaces).to receive(:revert_renames) + + subject.revert_renames + end + + it 'renames projects' do + rename_projects = double + expect(described_class::RenameProjects). + to receive(:new).with([], subject). + and_return(rename_projects) + expect(rename_projects).to receive(:revert_renames) + + subject.revert_renames + end + end end |