diff options
author | Robert Speicher <rspeicher@gmail.com> | 2017-08-02 22:55:11 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2017-08-03 00:47:31 +0300 |
commit | 72a7b30c9f363063449b28aa9efc3a26a1752f9f (patch) | |
tree | 173a716da52260e57a73c4a6d739fe055898d556 /spec/lib/gitlab/database/rename_reserved_paths_migration | |
parent | e2c3dca371f8dca8814a5924fe8ed271f0ec6399 (diff) |
Change all `:empty_project` to `:project`
Diffstat (limited to 'spec/lib/gitlab/database/rename_reserved_paths_migration')
3 files changed, 9 insertions, 9 deletions
diff --git a/spec/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_base_spec.rb b/spec/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_base_spec.rb index 254ce06381e..90aa4f63dd5 100644 --- a/spec/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_base_spec.rb +++ b/spec/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_base_spec.rb @@ -29,7 +29,7 @@ describe Gitlab::Database::RenameReservedPathsMigration::V1::RenameBase, :trunca end describe '#remove_cached_html_for_projects' do - let(:project) { create(:empty_project, description_html: 'Project description') } + let(:project) { create(:project, description_html: 'Project description') } it 'removes description_html from projects' do subject.remove_cached_html_for_projects([project.id]) @@ -110,7 +110,7 @@ describe Gitlab::Database::RenameReservedPathsMigration::V1::RenameBase, :trunca it "doesn't rename routes that start with a similar name" do other_namespace = create(:namespace, path: 'the-path-but-not-really') - project = create(:empty_project, path: 'the-project', namespace: other_namespace) + project = create(:project, path: 'the-project', namespace: other_namespace) subject.rename_path_for_routable(migration_namespace(namespace)) @@ -131,7 +131,7 @@ describe Gitlab::Database::RenameReservedPathsMigration::V1::RenameBase, :trunca context 'for projects' do let(:parent) { create(:namespace, path: 'the-parent') } - let(:project) { create(:empty_project, path: 'the-path', namespace: parent) } + let(:project) { create(:project, path: 'the-path', namespace: parent) } it 'renames the project called `the-path`' do subject.rename_path_for_routable(migration_project(project)) diff --git a/spec/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_namespaces_spec.rb b/spec/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_namespaces_spec.rb index 95695ca8c16..32ac0b88a9b 100644 --- a/spec/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_namespaces_spec.rb +++ b/spec/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_namespaces_spec.rb @@ -187,7 +187,7 @@ describe Gitlab::Database::RenameReservedPathsMigration::V1::RenameNamespaces, : end it 'invalidates the markdown cache of related projects' do - project = create(:empty_project, namespace: namespace, path: "the-path-project") + project = create(:project, namespace: namespace, path: "the-path-project") expect(subject).to receive(:remove_cached_html_for_projects).with([project.id]) diff --git a/spec/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_projects_spec.rb b/spec/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_projects_spec.rb index 19e23a32bda..595e06a9748 100644 --- a/spec/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_projects_spec.rb +++ b/spec/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_projects_spec.rb @@ -4,7 +4,7 @@ describe Gitlab::Database::RenameReservedPathsMigration::V1::RenameProjects, :tr let(:migration) { FakeRenameReservedPathMigrationV1.new } let(:subject) { described_class.new(['the-path'], migration) } let(:project) do - create(:empty_project, + create(:project, path: 'the-path', namespace: create(:namespace, path: 'known-parent' )) end @@ -17,7 +17,7 @@ describe Gitlab::Database::RenameReservedPathsMigration::V1::RenameProjects, :tr describe '#projects_for_paths' do it 'searches using nested paths' do namespace = create(:namespace, path: 'hello') - project = create(:empty_project, path: 'THE-path', namespace: namespace) + project = create(:project, path: 'THE-path', namespace: namespace) result_ids = described_class.new(['Hello/the-path'], migration) .projects_for_paths.map(&:id) @@ -26,8 +26,8 @@ describe Gitlab::Database::RenameReservedPathsMigration::V1::RenameProjects, :tr end it 'includes the correct projects' do - project = create(:empty_project, path: 'THE-path') - _other_project = create(:empty_project) + project = create(:project, path: 'THE-path') + _other_project = create(:project) result_ids = subject.projects_for_paths.map(&:id) @@ -36,7 +36,7 @@ describe Gitlab::Database::RenameReservedPathsMigration::V1::RenameProjects, :tr end describe '#rename_projects' do - let!(:projects) { create_list(:empty_project, 2, path: 'the-path') } + let!(:projects) { create_list(:project, 2, path: 'the-path') } it 'renames each project' do expect(subject).to receive(:rename_project).twice |