summaryrefslogtreecommitdiff
path: root/spec/lib
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/api/helpers/pagination_spec.rb2
-rw-r--r--spec/lib/banzai/filter/abstract_reference_filter_spec.rb2
-rw-r--r--spec/lib/banzai/filter/commit_reference_filter_spec.rb4
-rw-r--r--spec/lib/banzai/filter/gollum_tags_filter_spec.rb2
-rw-r--r--spec/lib/banzai/filter/issuable_state_filter_spec.rb4
-rw-r--r--spec/lib/banzai/filter/issue_reference_filter_spec.rb18
-rw-r--r--spec/lib/banzai/filter/label_reference_filter_spec.rb26
-rw-r--r--spec/lib/banzai/filter/merge_request_reference_filter_spec.rb14
-rw-r--r--spec/lib/banzai/filter/milestone_reference_filter_spec.rb14
-rw-r--r--spec/lib/banzai/filter/redactor_filter_spec.rb20
-rw-r--r--spec/lib/banzai/filter/reference_filter_spec.rb2
-rw-r--r--spec/lib/banzai/filter/relative_link_filter_spec.rb2
-rw-r--r--spec/lib/banzai/filter/snippet_reference_filter_spec.rb14
-rw-r--r--spec/lib/banzai/filter/upload_link_filter_spec.rb2
-rw-r--r--spec/lib/banzai/filter/user_reference_filter_spec.rb2
-rw-r--r--spec/lib/banzai/filter/wiki_link_filter_spec.rb2
-rw-r--r--spec/lib/banzai/issuable_extractor_spec.rb2
-rw-r--r--spec/lib/banzai/object_renderer_spec.rb4
-rw-r--r--spec/lib/banzai/pipeline/full_pipeline_spec.rb2
-rw-r--r--spec/lib/banzai/pipeline/gfm_pipeline_spec.rb4
-rw-r--r--spec/lib/banzai/pipeline/wiki_pipeline_spec.rb2
-rw-r--r--spec/lib/banzai/redactor_spec.rb2
-rw-r--r--spec/lib/banzai/reference_parser/base_parser_spec.rb2
-rw-r--r--spec/lib/banzai/reference_parser/commit_parser_spec.rb2
-rw-r--r--spec/lib/banzai/reference_parser/commit_range_parser_spec.rb2
-rw-r--r--spec/lib/banzai/reference_parser/external_issue_parser_spec.rb2
-rw-r--r--spec/lib/banzai/reference_parser/issue_parser_spec.rb2
-rw-r--r--spec/lib/banzai/reference_parser/label_parser_spec.rb2
-rw-r--r--spec/lib/banzai/reference_parser/milestone_parser_spec.rb2
-rw-r--r--spec/lib/banzai/reference_parser/snippet_parser_spec.rb2
-rw-r--r--spec/lib/banzai/reference_parser/user_parser_spec.rb12
-rw-r--r--spec/lib/ci/charts_spec.rb2
-rw-r--r--spec/lib/constraints/project_url_constrainer_spec.rb2
-rw-r--r--spec/lib/container_registry/blob_spec.rb2
-rw-r--r--spec/lib/container_registry/path_spec.rb12
-rw-r--r--spec/lib/event_filter_spec.rb2
-rw-r--r--spec/lib/gitlab/allowable_spec.rb4
-rw-r--r--spec/lib/gitlab/auth_spec.rb2
-rw-r--r--spec/lib/gitlab/background_migration/migrate_system_uploads_to_new_folder_spec.rb2
-rw-r--r--spec/lib/gitlab/backup/repository_spec.rb2
-rw-r--r--spec/lib/gitlab/badge/coverage/metadata_spec.rb2
-rw-r--r--spec/lib/gitlab/badge/pipeline/metadata_spec.rb2
-rw-r--r--spec/lib/gitlab/bitbucket_import/importer_spec.rb2
-rw-r--r--spec/lib/gitlab/cache/ci/project_pipeline_status_spec.rb4
-rw-r--r--spec/lib/gitlab/ci/status/pipeline/common_spec.rb2
-rw-r--r--spec/lib/gitlab/ci/status/stage/common_spec.rb2
-rw-r--r--spec/lib/gitlab/ci/status/stage/factory_spec.rb2
-rw-r--r--spec/lib/gitlab/closing_issue_extractor_spec.rb4
-rw-r--r--spec/lib/gitlab/contributions_calendar_spec.rb6
-rw-r--r--spec/lib/gitlab/cycle_analytics/permissions_spec.rb2
-rw-r--r--spec/lib/gitlab/cycle_analytics/shared_event_spec.rb2
-rw-r--r--spec/lib/gitlab/cycle_analytics/stage_summary_spec.rb2
-rw-r--r--spec/lib/gitlab/database/migration_helpers_spec.rb2
-rw-r--r--spec/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_base_spec.rb6
-rw-r--r--spec/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_namespaces_spec.rb2
-rw-r--r--spec/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_projects_spec.rb10
-rw-r--r--spec/lib/gitlab/email/attachment_uploader_spec.rb2
-rw-r--r--spec/lib/gitlab/email/handler/create_issue_handler_spec.rb2
-rw-r--r--spec/lib/gitlab/email/handler/unsubscribe_handler_spec.rb2
-rw-r--r--spec/lib/gitlab/gfm/reference_rewriter_spec.rb4
-rw-r--r--spec/lib/gitlab/gfm/uploads_rewriter_spec.rb4
-rw-r--r--spec/lib/gitlab/gitaly_client/notification_service_spec.rb2
-rw-r--r--spec/lib/gitlab/gitaly_client/ref_service_spec.rb2
-rw-r--r--spec/lib/gitlab/gitaly_client/repository_service_spec.rb2
-rw-r--r--spec/lib/gitlab/github_import/comment_formatter_spec.rb2
-rw-r--r--spec/lib/gitlab/github_import/issue_formatter_spec.rb2
-rw-r--r--spec/lib/gitlab/github_import/label_formatter_spec.rb2
-rw-r--r--spec/lib/gitlab/github_import/milestone_formatter_spec.rb2
-rw-r--r--spec/lib/gitlab/github_import/release_formatter_spec.rb2
-rw-r--r--spec/lib/gitlab/github_import/wiki_formatter_spec.rb2
-rw-r--r--spec/lib/gitlab/gitlab_import/importer_spec.rb2
-rw-r--r--spec/lib/gitlab/google_code_import/importer_spec.rb2
-rw-r--r--spec/lib/gitlab/graphs/commits_spec.rb2
-rw-r--r--spec/lib/gitlab/identifier_spec.rb2
-rw-r--r--spec/lib/gitlab/import_export/avatar_restorer_spec.rb2
-rw-r--r--spec/lib/gitlab/import_export/avatar_saver_spec.rb4
-rw-r--r--spec/lib/gitlab/import_export/fork_spec.rb2
-rw-r--r--spec/lib/gitlab/import_export/import_export_spec.rb2
-rw-r--r--spec/lib/gitlab/import_export/members_mapper_spec.rb6
-rw-r--r--spec/lib/gitlab/import_export/project_tree_restorer_spec.rb6
-rw-r--r--spec/lib/gitlab/import_export/relation_factory_spec.rb2
-rw-r--r--spec/lib/gitlab/import_export/repo_restorer_spec.rb2
-rw-r--r--spec/lib/gitlab/import_export/repo_saver_spec.rb2
-rw-r--r--spec/lib/gitlab/import_export/wiki_repo_saver_spec.rb2
-rw-r--r--spec/lib/gitlab/issuable_sorter_spec.rb12
-rw-r--r--spec/lib/gitlab/middleware/go_spec.rb4
-rw-r--r--spec/lib/gitlab/project_authorizations_spec.rb8
-rw-r--r--spec/lib/gitlab/project_search_results_spec.rb16
-rw-r--r--spec/lib/gitlab/reference_extractor_spec.rb4
-rw-r--r--spec/lib/gitlab/repo_path_spec.rb2
-rw-r--r--spec/lib/gitlab/search_results_spec.rb14
-rw-r--r--spec/lib/gitlab/slash_commands/command_spec.rb4
-rw-r--r--spec/lib/gitlab/slash_commands/deploy_spec.rb2
-rw-r--r--spec/lib/gitlab/slash_commands/issue_new_spec.rb2
-rw-r--r--spec/lib/gitlab/slash_commands/issue_search_spec.rb2
-rw-r--r--spec/lib/gitlab/slash_commands/issue_show_spec.rb2
-rw-r--r--spec/lib/gitlab/slash_commands/presenters/issue_new_spec.rb2
-rw-r--r--spec/lib/gitlab/slash_commands/presenters/issue_search_spec.rb2
-rw-r--r--spec/lib/gitlab/slash_commands/presenters/issue_show_spec.rb2
-rw-r--r--spec/lib/gitlab/template/issue_template_spec.rb4
-rw-r--r--spec/lib/gitlab/template/merge_request_template_spec.rb4
-rw-r--r--spec/lib/gitlab/uploads_transfer_spec.rb2
-rw-r--r--spec/lib/gitlab/url_builder_spec.rb2
-rw-r--r--spec/lib/gitlab/view/presenter/base_spec.rb8
-rw-r--r--spec/lib/repository_cache_spec.rb2
105 files changed, 213 insertions, 213 deletions
diff --git a/spec/lib/api/helpers/pagination_spec.rb b/spec/lib/api/helpers/pagination_spec.rb
index 267318faed4..fb3ef04b860 100644
--- a/spec/lib/api/helpers/pagination_spec.rb
+++ b/spec/lib/api/helpers/pagination_spec.rb
@@ -32,7 +32,7 @@ describe API::Helpers::Pagination do
context 'when resource can be paginated' do
before do
- create_list(:empty_project, 3)
+ create_list(:project, 3)
end
describe 'first page' do
diff --git a/spec/lib/banzai/filter/abstract_reference_filter_spec.rb b/spec/lib/banzai/filter/abstract_reference_filter_spec.rb
index 32d027b026b..7c0ba9ee67f 100644
--- a/spec/lib/banzai/filter/abstract_reference_filter_spec.rb
+++ b/spec/lib/banzai/filter/abstract_reference_filter_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
describe Banzai::Filter::AbstractReferenceFilter do
- let(:project) { create(:empty_project) }
+ let(:project) { create(:project) }
describe '#references_per_project' do
it 'returns a Hash containing references grouped per project paths' do
diff --git a/spec/lib/banzai/filter/commit_reference_filter_spec.rb b/spec/lib/banzai/filter/commit_reference_filter_spec.rb
index c7cf1c1d582..702fcac0c6f 100644
--- a/spec/lib/banzai/filter/commit_reference_filter_spec.rb
+++ b/spec/lib/banzai/filter/commit_reference_filter_spec.rb
@@ -121,7 +121,7 @@ describe Banzai::Filter::CommitReferenceFilter do
context 'cross-project / same-namespace complete reference' do
let(:namespace) { create(:namespace) }
- let(:project) { create(:empty_project, namespace: namespace) }
+ let(:project) { create(:project, namespace: namespace) }
let(:project2) { create(:project, :public, :repository, namespace: namespace) }
let(:commit) { project2.commit }
let(:reference) { "#{project2.full_path}@#{commit.short_id}" }
@@ -147,7 +147,7 @@ describe Banzai::Filter::CommitReferenceFilter do
context 'cross-project shorthand reference' do
let(:namespace) { create(:namespace) }
- let(:project) { create(:empty_project, namespace: namespace) }
+ let(:project) { create(:project, namespace: namespace) }
let(:project2) { create(:project, :public, :repository, namespace: namespace) }
let(:commit) { project2.commit }
let(:reference) { "#{project2.full_path}@#{commit.short_id}" }
diff --git a/spec/lib/banzai/filter/gollum_tags_filter_spec.rb b/spec/lib/banzai/filter/gollum_tags_filter_spec.rb
index 663e3514436..97d612e6347 100644
--- a/spec/lib/banzai/filter/gollum_tags_filter_spec.rb
+++ b/spec/lib/banzai/filter/gollum_tags_filter_spec.rb
@@ -3,7 +3,7 @@ require 'spec_helper'
describe Banzai::Filter::GollumTagsFilter do
include FilterSpecHelper
- let(:project) { create(:empty_project) }
+ let(:project) { create(:project) }
let(:user) { double }
let(:project_wiki) { ProjectWiki.new(project, user) }
diff --git a/spec/lib/banzai/filter/issuable_state_filter_spec.rb b/spec/lib/banzai/filter/issuable_state_filter_spec.rb
index bc7cae1df8d..cacb33d3372 100644
--- a/spec/lib/banzai/filter/issuable_state_filter_spec.rb
+++ b/spec/lib/banzai/filter/issuable_state_filter_spec.rb
@@ -7,8 +7,8 @@ describe Banzai::Filter::IssuableStateFilter do
let(:user) { create(:user) }
let(:context) { { current_user: user, issuable_state_filter_enabled: true } }
let(:closed_issue) { create_issue(:closed) }
- let(:project) { create(:empty_project, :public) }
- let(:other_project) { create(:empty_project, :public) }
+ let(:project) { create(:project, :public) }
+ let(:other_project) { create(:project, :public) }
def create_link(text, data)
link_to(text, '', class: 'gfm has-tooltip', data: data)
diff --git a/spec/lib/banzai/filter/issue_reference_filter_spec.rb b/spec/lib/banzai/filter/issue_reference_filter_spec.rb
index 024a5cafb41..9c74c9b8c99 100644
--- a/spec/lib/banzai/filter/issue_reference_filter_spec.rb
+++ b/spec/lib/banzai/filter/issue_reference_filter_spec.rb
@@ -7,7 +7,7 @@ describe Banzai::Filter::IssueReferenceFilter do
IssuesHelper
end
- let(:project) { create(:empty_project, :public) }
+ let(:project) { create(:project, :public) }
let(:issue) { create(:issue, project: project) }
it 'requires project context' do
@@ -125,7 +125,7 @@ describe Banzai::Filter::IssueReferenceFilter do
context 'cross-project / cross-namespace complete reference' do
it_behaves_like 'a reference containing an element node'
- let(:project2) { create(:empty_project, :public) }
+ let(:project2) { create(:project, :public) }
let(:issue) { create(:issue, project: project2) }
let(:reference) { "#{project2.full_path}##{issue.iid}" }
@@ -168,8 +168,8 @@ describe Banzai::Filter::IssueReferenceFilter do
it_behaves_like 'a reference containing an element node'
let(:namespace) { create(:namespace) }
- let(:project) { create(:empty_project, :public, namespace: namespace) }
- let(:project2) { create(:empty_project, :public, namespace: namespace) }
+ let(:project) { create(:project, :public, namespace: namespace) }
+ let(:project2) { create(:project, :public, namespace: namespace) }
let(:issue) { create(:issue, project: project2) }
let(:reference) { "#{project2.full_path}##{issue.iid}" }
@@ -212,8 +212,8 @@ describe Banzai::Filter::IssueReferenceFilter do
it_behaves_like 'a reference containing an element node'
let(:namespace) { create(:namespace) }
- let(:project) { create(:empty_project, :public, namespace: namespace) }
- let(:project2) { create(:empty_project, :public, namespace: namespace) }
+ let(:project) { create(:project, :public, namespace: namespace) }
+ let(:project2) { create(:project, :public, namespace: namespace) }
let(:issue) { create(:issue, project: project2) }
let(:reference) { "#{project2.path}##{issue.iid}" }
@@ -256,7 +256,7 @@ describe Banzai::Filter::IssueReferenceFilter do
it_behaves_like 'a reference containing an element node'
let(:namespace) { create(:namespace, name: 'cross-reference') }
- let(:project2) { create(:empty_project, :public, namespace: namespace) }
+ let(:project2) { create(:project, :public, namespace: namespace) }
let(:issue) { create(:issue, project: project2) }
let(:reference) { helper.url_for_issue(issue.iid, project2) + "#note_123" }
@@ -277,7 +277,7 @@ describe Banzai::Filter::IssueReferenceFilter do
it_behaves_like 'a reference containing an element node'
let(:namespace) { create(:namespace, name: 'cross-reference') }
- let(:project2) { create(:empty_project, :public, namespace: namespace) }
+ let(:project2) { create(:project, :public, namespace: namespace) }
let(:issue) { create(:issue, project: project2) }
let(:reference) { issue.to_reference(project) }
let(:reference_link) { %{<a href="#{reference}">Reference</a>} }
@@ -299,7 +299,7 @@ describe Banzai::Filter::IssueReferenceFilter do
it_behaves_like 'a reference containing an element node'
let(:namespace) { create(:namespace, name: 'cross-reference') }
- let(:project2) { create(:empty_project, :public, namespace: namespace) }
+ let(:project2) { create(:project, :public, namespace: namespace) }
let(:issue) { create(:issue, project: project2) }
let(:reference) { "#{helper.url_for_issue(issue.iid, project2) + "#note_123"}" }
let(:reference_link) { %{<a href="#{reference}">Reference</a>} }
diff --git a/spec/lib/banzai/filter/label_reference_filter_spec.rb b/spec/lib/banzai/filter/label_reference_filter_spec.rb
index dfd4c7a7279..2cd30a5e302 100644
--- a/spec/lib/banzai/filter/label_reference_filter_spec.rb
+++ b/spec/lib/banzai/filter/label_reference_filter_spec.rb
@@ -4,7 +4,7 @@ require 'html/pipeline'
describe Banzai::Filter::LabelReferenceFilter do
include FilterSpecHelper
- let(:project) { create(:empty_project, :public, name: 'sample-project') }
+ let(:project) { create(:project, :public, name: 'sample-project') }
let(:label) { create(:label, project: project) }
let(:reference) { label.to_reference }
@@ -315,7 +315,7 @@ describe Banzai::Filter::LabelReferenceFilter do
describe 'group label references' do
let(:group) { create(:group) }
- let(:project) { create(:empty_project, :public, namespace: group) }
+ let(:project) { create(:project, :public, namespace: group) }
let(:group_label) { create(:group_label, name: 'gfm references', group: group) }
context 'without project reference' do
@@ -366,7 +366,7 @@ describe Banzai::Filter::LabelReferenceFilter do
end
describe 'cross-project / cross-namespace complete reference' do
- let(:project2) { create(:empty_project) }
+ let(:project2) { create(:project) }
let(:label) { create(:label, project: project2, color: '#00ff00') }
let(:reference) { "#{project2.full_path}~#{label.name}" }
let!(:result) { reference_filter("See #{reference}") }
@@ -397,8 +397,8 @@ describe Banzai::Filter::LabelReferenceFilter do
describe 'cross-project / same-namespace complete reference' do
let(:namespace) { create(:namespace) }
- let(:project) { create(:empty_project, namespace: namespace) }
- let(:project2) { create(:empty_project, namespace: namespace) }
+ let(:project) { create(:project, namespace: namespace) }
+ let(:project2) { create(:project, namespace: namespace) }
let(:label) { create(:label, project: project2, color: '#00ff00') }
let(:reference) { "#{project2.full_path}~#{label.name}" }
let!(:result) { reference_filter("See #{reference}") }
@@ -429,8 +429,8 @@ describe Banzai::Filter::LabelReferenceFilter do
describe 'cross-project shorthand reference' do
let(:namespace) { create(:namespace) }
- let(:project) { create(:empty_project, namespace: namespace) }
- let(:project2) { create(:empty_project, namespace: namespace) }
+ let(:project) { create(:project, namespace: namespace) }
+ let(:project2) { create(:project, namespace: namespace) }
let(:label) { create(:label, project: project2, color: '#00ff00') }
let(:reference) { "#{project2.path}~#{label.name}" }
let!(:result) { reference_filter("See #{reference}") }
@@ -462,9 +462,9 @@ describe Banzai::Filter::LabelReferenceFilter do
describe 'cross group label references' do
let(:group) { create(:group) }
- let(:project) { create(:empty_project, :public, namespace: group) }
+ let(:project) { create(:project, :public, namespace: group) }
let(:another_group) { create(:group) }
- let(:another_project) { create(:empty_project, :public, namespace: another_group) }
+ let(:another_project) { create(:project, :public, namespace: another_group) }
let(:group_label) { create(:group_label, group: another_group, color: '#00ff00') }
let(:reference) { "#{another_project.full_path}~#{group_label.name}" }
let!(:result) { reference_filter("See #{reference}", project: project) }
@@ -498,8 +498,8 @@ describe Banzai::Filter::LabelReferenceFilter do
describe 'cross-project / same-group_label complete reference' do
let(:group) { create(:group) }
- let(:project) { create(:empty_project, :public, namespace: group) }
- let(:another_project) { create(:empty_project, :public, namespace: group) }
+ let(:project) { create(:project, :public, namespace: group) }
+ let(:another_project) { create(:project, :public, namespace: group) }
let(:group_label) { create(:group_label, group: group, color: '#00ff00') }
let(:reference) { "#{another_project.full_path}~#{group_label.name}" }
let!(:result) { reference_filter("See #{reference}", project: project) }
@@ -533,7 +533,7 @@ describe Banzai::Filter::LabelReferenceFilter do
describe 'same project / same group_label complete reference' do
let(:group) { create(:group) }
- let(:project) { create(:empty_project, :public, namespace: group) }
+ let(:project) { create(:project, :public, namespace: group) }
let(:group_label) { create(:group_label, group: group, color: '#00ff00') }
let(:reference) { "#{project.full_path}~#{group_label.name}" }
let!(:result) { reference_filter("See #{reference}", project: project) }
@@ -565,7 +565,7 @@ describe Banzai::Filter::LabelReferenceFilter do
describe 'same project / same group_label shorthand reference' do
let(:group) { create(:group) }
- let(:project) { create(:empty_project, :public, namespace: group) }
+ let(:project) { create(:project, :public, namespace: group) }
let(:group_label) { create(:group_label, group: group, color: '#00ff00') }
let(:reference) { "#{project.path}~#{group_label.name}" }
let!(:result) { reference_filter("See #{reference}", project: project) }
diff --git a/spec/lib/banzai/filter/merge_request_reference_filter_spec.rb b/spec/lib/banzai/filter/merge_request_reference_filter_spec.rb
index b693ae3eca2..ed2788f8a33 100644
--- a/spec/lib/banzai/filter/merge_request_reference_filter_spec.rb
+++ b/spec/lib/banzai/filter/merge_request_reference_filter_spec.rb
@@ -3,7 +3,7 @@ require 'spec_helper'
describe Banzai::Filter::MergeRequestReferenceFilter do
include FilterSpecHelper
- let(:project) { create(:empty_project, :public) }
+ let(:project) { create(:project, :public) }
let(:merge) { create(:merge_request, source_project: project) }
it 'requires project context' do
@@ -100,7 +100,7 @@ describe Banzai::Filter::MergeRequestReferenceFilter do
end
context 'cross-project / cross-namespace complete reference' do
- let(:project2) { create(:empty_project, :public) }
+ let(:project2) { create(:project, :public) }
let(:merge) { create(:merge_request, source_project: project2) }
let(:reference) { "#{project2.full_path}!#{merge.iid}" }
@@ -132,8 +132,8 @@ describe Banzai::Filter::MergeRequestReferenceFilter do
context 'cross-project / same-namespace complete reference' do
let(:namespace) { create(:namespace) }
- let(:project) { create(:empty_project, :public, namespace: namespace) }
- let(:project2) { create(:empty_project, :public, namespace: namespace) }
+ let(:project) { create(:project, :public, namespace: namespace) }
+ let(:project2) { create(:project, :public, namespace: namespace) }
let!(:merge) { create(:merge_request, source_project: project2) }
let(:reference) { "#{project2.full_path}!#{merge.iid}" }
@@ -165,8 +165,8 @@ describe Banzai::Filter::MergeRequestReferenceFilter do
context 'cross-project shorthand reference' do
let(:namespace) { create(:namespace) }
- let(:project) { create(:empty_project, :public, namespace: namespace) }
- let(:project2) { create(:empty_project, :public, namespace: namespace) }
+ let(:project) { create(:project, :public, namespace: namespace) }
+ let(:project2) { create(:project, :public, namespace: namespace) }
let!(:merge) { create(:merge_request, source_project: project2) }
let(:reference) { "#{project2.path}!#{merge.iid}" }
@@ -198,7 +198,7 @@ describe Banzai::Filter::MergeRequestReferenceFilter do
context 'cross-project URL reference' do
let(:namespace) { create(:namespace, name: 'cross-reference') }
- let(:project2) { create(:empty_project, :public, namespace: namespace) }
+ let(:project2) { create(:project, :public, namespace: namespace) }
let(:merge) { create(:merge_request, source_project: project2, target_project: project2) }
let(:reference) { urls.project_merge_request_url(project2, merge) + '/diffs#note_123' }
diff --git a/spec/lib/banzai/filter/milestone_reference_filter_spec.rb b/spec/lib/banzai/filter/milestone_reference_filter_spec.rb
index 79ff9419e4b..5db77566513 100644
--- a/spec/lib/banzai/filter/milestone_reference_filter_spec.rb
+++ b/spec/lib/banzai/filter/milestone_reference_filter_spec.rb
@@ -3,7 +3,7 @@ require 'spec_helper'
describe Banzai::Filter::MilestoneReferenceFilter do
include FilterSpecHelper
- let(:project) { create(:empty_project, :public) }
+ let(:project) { create(:project, :public) }
let(:milestone) { create(:milestone, project: project) }
let(:reference) { milestone.to_reference }
@@ -150,7 +150,7 @@ describe Banzai::Filter::MilestoneReferenceFilter do
describe 'cross-project / cross-namespace complete reference' do
let(:namespace) { create(:namespace) }
- let(:another_project) { create(:empty_project, :public, namespace: namespace) }
+ let(:another_project) { create(:project, :public, namespace: namespace) }
let(:milestone) { create(:milestone, project: another_project) }
let(:reference) { "#{another_project.full_path}%#{milestone.iid}" }
let!(:result) { reference_filter("See #{reference}") }
@@ -186,8 +186,8 @@ describe Banzai::Filter::MilestoneReferenceFilter do
describe 'cross-project / same-namespace complete reference' do
let(:namespace) { create(:namespace) }
- let(:project) { create(:empty_project, :public, namespace: namespace) }
- let(:another_project) { create(:empty_project, :public, namespace: namespace) }
+ let(:project) { create(:project, :public, namespace: namespace) }
+ let(:another_project) { create(:project, :public, namespace: namespace) }
let(:milestone) { create(:milestone, project: another_project) }
let(:reference) { "#{another_project.full_path}%#{milestone.iid}" }
let!(:result) { reference_filter("See #{reference}") }
@@ -223,8 +223,8 @@ describe Banzai::Filter::MilestoneReferenceFilter do
describe 'cross project shorthand reference' do
let(:namespace) { create(:namespace) }
- let(:project) { create(:empty_project, :public, namespace: namespace) }
- let(:another_project) { create(:empty_project, :public, namespace: namespace) }
+ let(:project) { create(:project, :public, namespace: namespace) }
+ let(:another_project) { create(:project, :public, namespace: namespace) }
let(:milestone) { create(:milestone, project: another_project) }
let(:reference) { "#{another_project.path}%#{milestone.iid}" }
let!(:result) { reference_filter("See #{reference}") }
@@ -259,7 +259,7 @@ describe Banzai::Filter::MilestoneReferenceFilter do
end
describe 'cross project milestone references' do
- let(:another_project) { create(:empty_project, :public) }
+ let(:another_project) { create(:project, :public) }
let(:project_path) { another_project.full_path }
let(:milestone) { create(:milestone, project: another_project) }
let(:reference) { milestone.to_reference(project) }
diff --git a/spec/lib/banzai/filter/redactor_filter_spec.rb b/spec/lib/banzai/filter/redactor_filter_spec.rb
index fb6b81d4f10..68643effb66 100644
--- a/spec/lib/banzai/filter/redactor_filter_spec.rb
+++ b/spec/lib/banzai/filter/redactor_filter_spec.rb
@@ -17,7 +17,7 @@ describe Banzai::Filter::RedactorFilter do
it 'skips when the skip_redaction flag is set' do
user = create(:user)
- project = create(:empty_project)
+ project = create(:project)
link = reference_link(project: project.id, reference_type: 'test')
doc = filter(link, current_user: user, skip_redaction: true)
@@ -45,7 +45,7 @@ describe Banzai::Filter::RedactorFilter do
it 'allows permitted Project references' do
user = create(:user)
- project = create(:empty_project)
+ project = create(:project)
project.team << [user, :master]
link = reference_link(project: project.id, reference_type: 'test')
@@ -62,7 +62,7 @@ describe Banzai::Filter::RedactorFilter do
it 'removes unpermitted references' do
user = create(:user)
- project = create(:empty_project)
+ project = create(:project)
link = reference_link(project: project.id, reference_type: 'test')
doc = filter(link, current_user: user)
@@ -82,7 +82,7 @@ describe Banzai::Filter::RedactorFilter do
context 'for confidential issues' do
it 'removes references for non project members' do
non_member = create(:user)
- project = create(:empty_project, :public)
+ project = create(:project, :public)
issue = create(:issue, :confidential, project: project)
link = reference_link(project: project.id, issue: issue.id, reference_type: 'issue')
@@ -93,7 +93,7 @@ describe Banzai::Filter::RedactorFilter do
it 'removes references for project members with guest role' do
member = create(:user)
- project = create(:empty_project, :public)
+ project = create(:project, :public)
project.team << [member, :guest]
issue = create(:issue, :confidential, project: project)
@@ -105,7 +105,7 @@ describe Banzai::Filter::RedactorFilter do
it 'allows references for author' do
author = create(:user)
- project = create(:empty_project, :public)
+ project = create(:project, :public)
issue = create(:issue, :confidential, project: project, author: author)
link = reference_link(project: project.id, issue: issue.id, reference_type: 'issue')
@@ -116,7 +116,7 @@ describe Banzai::Filter::RedactorFilter do
it 'allows references for assignee' do
assignee = create(:user)
- project = create(:empty_project, :public)
+ project = create(:project, :public)
issue = create(:issue, :confidential, project: project, assignees: [assignee])
link = reference_link(project: project.id, issue: issue.id, reference_type: 'issue')
@@ -127,7 +127,7 @@ describe Banzai::Filter::RedactorFilter do
it 'allows references for project members' do
member = create(:user)
- project = create(:empty_project, :public)
+ project = create(:project, :public)
project.team << [member, :developer]
issue = create(:issue, :confidential, project: project)
@@ -139,7 +139,7 @@ describe Banzai::Filter::RedactorFilter do
it 'allows references for admin' do
admin = create(:admin)
- project = create(:empty_project, :public)
+ project = create(:project, :public)
issue = create(:issue, :confidential, project: project)
link = reference_link(project: project.id, issue: issue.id, reference_type: 'issue')
@@ -151,7 +151,7 @@ describe Banzai::Filter::RedactorFilter do
it 'allows references for non confidential issues' do
user = create(:user)
- project = create(:empty_project, :public)
+ project = create(:project, :public)
issue = create(:issue, project: project)
link = reference_link(project: project.id, issue: issue.id, reference_type: 'issue')
diff --git a/spec/lib/banzai/filter/reference_filter_spec.rb b/spec/lib/banzai/filter/reference_filter_spec.rb
index 81f244a4539..f96b6c83b0a 100644
--- a/spec/lib/banzai/filter/reference_filter_spec.rb
+++ b/spec/lib/banzai/filter/reference_filter_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
describe Banzai::Filter::ReferenceFilter do
- let(:project) { build_stubbed(:empty_project) }
+ let(:project) { build_stubbed(:project) }
describe '#each_node' do
it 'iterates over the nodes in a document' do
diff --git a/spec/lib/banzai/filter/relative_link_filter_spec.rb b/spec/lib/banzai/filter/relative_link_filter_spec.rb
index e97199672f3..08beede62db 100644
--- a/spec/lib/banzai/filter/relative_link_filter_spec.rb
+++ b/spec/lib/banzai/filter/relative_link_filter_spec.rb
@@ -56,7 +56,7 @@ describe Banzai::Filter::RelativeLinkFilter do
end
context 'without a repository' do
- let(:project) { create(:empty_project) }
+ let(:project) { create(:project) }
include_examples :preserve_unchanged
end
diff --git a/spec/lib/banzai/filter/snippet_reference_filter_spec.rb b/spec/lib/banzai/filter/snippet_reference_filter_spec.rb
index a7eee7a4515..90ac4c7b238 100644
--- a/spec/lib/banzai/filter/snippet_reference_filter_spec.rb
+++ b/spec/lib/banzai/filter/snippet_reference_filter_spec.rb
@@ -3,7 +3,7 @@ require 'spec_helper'
describe Banzai::Filter::SnippetReferenceFilter do
include FilterSpecHelper
- let(:project) { create(:empty_project, :public) }
+ let(:project) { create(:project, :public) }
let(:snippet) { create(:project_snippet, project: project) }
let(:reference) { snippet.to_reference }
@@ -81,7 +81,7 @@ describe Banzai::Filter::SnippetReferenceFilter do
context 'cross-project / cross-namespace complete reference' do
let(:namespace) { create(:namespace) }
- let(:project2) { create(:empty_project, :public, namespace: namespace) }
+ let(:project2) { create(:project, :public, namespace: namespace) }
let!(:snippet) { create(:project_snippet, project: project2) }
let(:reference) { "#{project2.full_path}$#{snippet.id}" }
@@ -113,8 +113,8 @@ describe Banzai::Filter::SnippetReferenceFilter do
context 'cross-project / same-namespace complete reference' do
let(:namespace) { create(:namespace) }
- let(:project) { create(:empty_project, :public, namespace: namespace) }
- let(:project2) { create(:empty_project, :public, namespace: namespace) }
+ let(:project) { create(:project, :public, namespace: namespace) }
+ let(:project2) { create(:project, :public, namespace: namespace) }
let!(:snippet) { create(:project_snippet, project: project2) }
let(:reference) { "#{project2.full_path}$#{snippet.id}" }
@@ -146,8 +146,8 @@ describe Banzai::Filter::SnippetReferenceFilter do
context 'cross-project shorthand reference' do
let(:namespace) { create(:namespace) }
- let(:project) { create(:empty_project, :public, namespace: namespace) }
- let(:project2) { create(:empty_project, :public, namespace: namespace) }
+ let(:project) { create(:project, :public, namespace: namespace) }
+ let(:project2) { create(:project, :public, namespace: namespace) }
let!(:snippet) { create(:project_snippet, project: project2) }
let(:reference) { "#{project2.path}$#{snippet.id}" }
@@ -179,7 +179,7 @@ describe Banzai::Filter::SnippetReferenceFilter do
context 'cross-project URL reference' do
let(:namespace) { create(:namespace, name: 'cross-reference') }
- let(:project2) { create(:empty_project, :public, namespace: namespace) }
+ let(:project2) { create(:project, :public, namespace: namespace) }
let(:snippet) { create(:project_snippet, project: project2) }
let(:reference) { urls.project_snippet_url(project2, snippet) }
diff --git a/spec/lib/banzai/filter/upload_link_filter_spec.rb b/spec/lib/banzai/filter/upload_link_filter_spec.rb
index 74a23a9ab5e..60a88e903ef 100644
--- a/spec/lib/banzai/filter/upload_link_filter_spec.rb
+++ b/spec/lib/banzai/filter/upload_link_filter_spec.rb
@@ -29,7 +29,7 @@ describe Banzai::Filter::UploadLinkFilter do
%(<div><a href="#{path}">#{path}</a></div>)
end
- let(:project) { create(:empty_project) }
+ let(:project) { create(:project) }
shared_examples :preserve_unchanged do
it 'does not modify any relative URL in anchor' do
diff --git a/spec/lib/banzai/filter/user_reference_filter_spec.rb b/spec/lib/banzai/filter/user_reference_filter_spec.rb
index 7ea9df5eda5..34dac1db69a 100644
--- a/spec/lib/banzai/filter/user_reference_filter_spec.rb
+++ b/spec/lib/banzai/filter/user_reference_filter_spec.rb
@@ -3,7 +3,7 @@ require 'spec_helper'
describe Banzai::Filter::UserReferenceFilter do
include FilterSpecHelper
- let(:project) { create(:empty_project, :public) }
+ let(:project) { create(:project, :public) }
let(:user) { create(:user) }
let(:reference) { user.to_reference }
diff --git a/spec/lib/banzai/filter/wiki_link_filter_spec.rb b/spec/lib/banzai/filter/wiki_link_filter_spec.rb
index ceafd12a68e..9596f004052 100644
--- a/spec/lib/banzai/filter/wiki_link_filter_spec.rb
+++ b/spec/lib/banzai/filter/wiki_link_filter_spec.rb
@@ -4,7 +4,7 @@ describe Banzai::Filter::WikiLinkFilter do
include FilterSpecHelper
let(:namespace) { build_stubbed(:namespace, name: "wiki_link_ns") }
- let(:project) { build_stubbed(:empty_project, :public, name: "wiki_link_project", namespace: namespace) }
+ let(:project) { build_stubbed(:project, :public, name: "wiki_link_project", namespace: namespace) }
let(:user) { double }
let(:wiki) { ProjectWiki.new(project, user) }
diff --git a/spec/lib/banzai/issuable_extractor_spec.rb b/spec/lib/banzai/issuable_extractor_spec.rb
index 728271e757b..69763476dac 100644
--- a/spec/lib/banzai/issuable_extractor_spec.rb
+++ b/spec/lib/banzai/issuable_extractor_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
describe Banzai::IssuableExtractor do
- let(:project) { create(:empty_project) }
+ let(:project) { create(:project) }
let(:user) { create(:user) }
let(:extractor) { described_class.new(project, user) }
let(:issue) { create(:issue, project: project) }
diff --git a/spec/lib/banzai/object_renderer_spec.rb b/spec/lib/banzai/object_renderer_spec.rb
index dd2674f9f20..7f5d481c36c 100644
--- a/spec/lib/banzai/object_renderer_spec.rb
+++ b/spec/lib/banzai/object_renderer_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
describe Banzai::ObjectRenderer do
- let(:project) { create(:empty_project) }
+ let(:project) { create(:project) }
let(:user) { project.owner }
let(:renderer) { described_class.new(project, user, custom_value: 'value') }
let(:object) { Note.new(note: 'hello', note_html: '<p dir="auto">hello</p>', cached_markdown_version: CacheMarkdownField::CACHE_VERSION) }
@@ -28,7 +28,7 @@ describe Banzai::ObjectRenderer do
it 'passes context to PostProcessPipeline' do
another_user = create(:user)
- another_project = create(:empty_project)
+ another_project = create(:project)
object = Note.new(
note: 'hello',
note_html: 'hello',
diff --git a/spec/lib/banzai/pipeline/full_pipeline_spec.rb b/spec/lib/banzai/pipeline/full_pipeline_spec.rb
index 2501b638774..e9c7a2f352e 100644
--- a/spec/lib/banzai/pipeline/full_pipeline_spec.rb
+++ b/spec/lib/banzai/pipeline/full_pipeline_spec.rb
@@ -2,7 +2,7 @@ require 'rails_helper'
describe Banzai::Pipeline::FullPipeline do
describe 'References' do
- let(:project) { create(:empty_project, :public) }
+ let(:project) { create(:project, :public) }
let(:issue) { create(:issue, project: project) }
it 'handles markdown inside a reference' do
diff --git a/spec/lib/banzai/pipeline/gfm_pipeline_spec.rb b/spec/lib/banzai/pipeline/gfm_pipeline_spec.rb
index 601ffbb5456..75413596431 100644
--- a/spec/lib/banzai/pipeline/gfm_pipeline_spec.rb
+++ b/spec/lib/banzai/pipeline/gfm_pipeline_spec.rb
@@ -36,7 +36,7 @@ describe Banzai::Pipeline::GfmPipeline do
end
it 'parses cross-project references to regular issues' do
- other_project = create(:empty_project, :public)
+ other_project = create(:project, :public)
issue = create(:issue, project: other_project)
markdown = issue.to_reference(project, full: true)
@@ -74,7 +74,7 @@ describe Banzai::Pipeline::GfmPipeline do
end
it 'parses cross-project references to regular issues' do
- other_project = create(:empty_project, :public)
+ other_project = create(:project, :public)
issue = create(:issue, project: other_project)
markdown = issue.to_reference(project, full: true)
diff --git a/spec/lib/banzai/pipeline/wiki_pipeline_spec.rb b/spec/lib/banzai/pipeline/wiki_pipeline_spec.rb
index ac9bde6baf1..88ae4c1e07a 100644
--- a/spec/lib/banzai/pipeline/wiki_pipeline_spec.rb
+++ b/spec/lib/banzai/pipeline/wiki_pipeline_spec.rb
@@ -53,7 +53,7 @@ describe Banzai::Pipeline::WikiPipeline do
describe "Links" do
let(:namespace) { create(:namespace, name: "wiki_link_ns") }
- let(:project) { create(:empty_project, :public, name: "wiki_link_project", namespace: namespace) }
+ let(:project) { create(:project, :public, name: "wiki_link_project", namespace: namespace) }
let(:project_wiki) { ProjectWiki.new(project, double(:user)) }
let(:page) { build(:wiki_page, wiki: project_wiki, page: OpenStruct.new(url_path: 'nested/twice/start-page')) }
diff --git a/spec/lib/banzai/redactor_spec.rb b/spec/lib/banzai/redactor_spec.rb
index 81ae5685b10..2424c3fdc66 100644
--- a/spec/lib/banzai/redactor_spec.rb
+++ b/spec/lib/banzai/redactor_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper'
describe Banzai::Redactor do
let(:user) { build(:user) }
- let(:project) { build(:empty_project) }
+ let(:project) { build(:project) }
let(:redactor) { described_class.new(project, user) }
describe '#redact' do
diff --git a/spec/lib/banzai/reference_parser/base_parser_spec.rb b/spec/lib/banzai/reference_parser/base_parser_spec.rb
index 0bf45329657..6175d4c4ca9 100644
--- a/spec/lib/banzai/reference_parser/base_parser_spec.rb
+++ b/spec/lib/banzai/reference_parser/base_parser_spec.rb
@@ -4,7 +4,7 @@ describe Banzai::ReferenceParser::BaseParser do
include ReferenceParserHelpers
let(:user) { create(:user) }
- let(:project) { create(:empty_project, :public) }
+ let(:project) { create(:project, :public) }
subject do
klass = Class.new(described_class) do
diff --git a/spec/lib/banzai/reference_parser/commit_parser_spec.rb b/spec/lib/banzai/reference_parser/commit_parser_spec.rb
index 69bf28cdf85..3505659c2c3 100644
--- a/spec/lib/banzai/reference_parser/commit_parser_spec.rb
+++ b/spec/lib/banzai/reference_parser/commit_parser_spec.rb
@@ -3,7 +3,7 @@ require 'spec_helper'
describe Banzai::ReferenceParser::CommitParser do
include ReferenceParserHelpers
- let(:project) { create(:empty_project, :public) }
+ let(:project) { create(:project, :public) }
let(:user) { create(:user) }
subject { described_class.new(project, user) }
let(:link) { empty_html_link }
diff --git a/spec/lib/banzai/reference_parser/commit_range_parser_spec.rb b/spec/lib/banzai/reference_parser/commit_range_parser_spec.rb
index b384a59bfb4..21813177deb 100644
--- a/spec/lib/banzai/reference_parser/commit_range_parser_spec.rb
+++ b/spec/lib/banzai/reference_parser/commit_range_parser_spec.rb
@@ -3,7 +3,7 @@ require 'spec_helper'
describe Banzai::ReferenceParser::CommitRangeParser do
include ReferenceParserHelpers
- let(:project) { create(:empty_project, :public) }
+ let(:project) { create(:project, :public) }
let(:user) { create(:user) }
subject { described_class.new(project, user) }
let(:link) { empty_html_link }
diff --git a/spec/lib/banzai/reference_parser/external_issue_parser_spec.rb b/spec/lib/banzai/reference_parser/external_issue_parser_spec.rb
index a3256afdbb1..25969b65168 100644
--- a/spec/lib/banzai/reference_parser/external_issue_parser_spec.rb
+++ b/spec/lib/banzai/reference_parser/external_issue_parser_spec.rb
@@ -3,7 +3,7 @@ require 'spec_helper'
describe Banzai::ReferenceParser::ExternalIssueParser do
include ReferenceParserHelpers
- let(:project) { create(:empty_project, :public) }
+ let(:project) { create(:project, :public) }
let(:user) { create(:user) }
subject { described_class.new(project, user) }
let(:link) { empty_html_link }
diff --git a/spec/lib/banzai/reference_parser/issue_parser_spec.rb b/spec/lib/banzai/reference_parser/issue_parser_spec.rb
index 94b989fe91d..23dbe2b6238 100644
--- a/spec/lib/banzai/reference_parser/issue_parser_spec.rb
+++ b/spec/lib/banzai/reference_parser/issue_parser_spec.rb
@@ -3,7 +3,7 @@ require 'spec_helper'
describe Banzai::ReferenceParser::IssueParser do
include ReferenceParserHelpers
- let(:project) { create(:empty_project, :public) }
+ let(:project) { create(:project, :public) }
let(:user) { create(:user) }
let(:issue) { create(:issue, project: project) }
let(:link) { empty_html_link }
diff --git a/spec/lib/banzai/reference_parser/label_parser_spec.rb b/spec/lib/banzai/reference_parser/label_parser_spec.rb
index cf1b2a92195..b700161d6c2 100644
--- a/spec/lib/banzai/reference_parser/label_parser_spec.rb
+++ b/spec/lib/banzai/reference_parser/label_parser_spec.rb
@@ -3,7 +3,7 @@ require 'spec_helper'
describe Banzai::ReferenceParser::LabelParser do
include ReferenceParserHelpers
- let(:project) { create(:empty_project, :public) }
+ let(:project) { create(:project, :public) }
let(:user) { create(:user) }
let(:label) { create(:label, project: project) }
subject { described_class.new(project, user) }
diff --git a/spec/lib/banzai/reference_parser/milestone_parser_spec.rb b/spec/lib/banzai/reference_parser/milestone_parser_spec.rb
index 2cfcafa8798..7dacdf8d629 100644
--- a/spec/lib/banzai/reference_parser/milestone_parser_spec.rb
+++ b/spec/lib/banzai/reference_parser/milestone_parser_spec.rb
@@ -3,7 +3,7 @@ require 'spec_helper'
describe Banzai::ReferenceParser::MilestoneParser do
include ReferenceParserHelpers
- let(:project) { create(:empty_project, :public) }
+ let(:project) { create(:project, :public) }
let(:user) { create(:user) }
let(:milestone) { create(:milestone, project: project) }
subject { described_class.new(project, user) }
diff --git a/spec/lib/banzai/reference_parser/snippet_parser_spec.rb b/spec/lib/banzai/reference_parser/snippet_parser_spec.rb
index c6d0b7be254..69ec3f66aa8 100644
--- a/spec/lib/banzai/reference_parser/snippet_parser_spec.rb
+++ b/spec/lib/banzai/reference_parser/snippet_parser_spec.rb
@@ -3,7 +3,7 @@ require 'spec_helper'
describe Banzai::ReferenceParser::SnippetParser do
include ReferenceParserHelpers
- let(:project) { create(:empty_project, :public) }
+ let(:project) { create(:project, :public) }
let(:user) { create(:user) }
let(:external_user) { create(:user, :external) }
diff --git a/spec/lib/banzai/reference_parser/user_parser_spec.rb b/spec/lib/banzai/reference_parser/user_parser_spec.rb
index 64f2b607d7c..e49726aca6c 100644
--- a/spec/lib/banzai/reference_parser/user_parser_spec.rb
+++ b/spec/lib/banzai/reference_parser/user_parser_spec.rb
@@ -5,7 +5,7 @@ describe Banzai::ReferenceParser::UserParser do
let(:group) { create(:group) }
let(:user) { create(:user) }
- let(:project) { create(:empty_project, :public, group: group, creator: user) }
+ let(:project) { create(:project, :public, group: group, creator: user) }
subject { described_class.new(project, user) }
let(:link) { empty_html_link }
@@ -125,7 +125,7 @@ describe Banzai::ReferenceParser::UserParser do
end
it 'returns the nodes if the user can read the project' do
- other_project = create(:empty_project, :public)
+ other_project = create(:project, :public)
link['data-project'] = other_project.id.to_s
@@ -137,7 +137,7 @@ describe Banzai::ReferenceParser::UserParser do
end
it 'returns an empty Array if the user can not read the project' do
- other_project = create(:empty_project, :public)
+ other_project = create(:project, :public)
link['data-project'] = other_project.id.to_s
@@ -161,7 +161,7 @@ describe Banzai::ReferenceParser::UserParser do
describe '#nodes_user_can_reference' do
context 'when the link has a data-author attribute' do
it 'returns the nodes when the user is a member of the project' do
- other_project = create(:empty_project)
+ other_project = create(:project)
other_project.team << [user, :developer]
link['data-project'] = other_project.id.to_s
@@ -178,7 +178,7 @@ describe Banzai::ReferenceParser::UserParser do
end
it 'returns an empty Array when the user could not be found' do
- other_project = create(:empty_project)
+ other_project = create(:project)
link['data-project'] = other_project.id.to_s
link['data-author'] = ''
@@ -187,7 +187,7 @@ describe Banzai::ReferenceParser::UserParser do
end
it 'returns an empty Array when the user is not a team member' do
- other_project = create(:empty_project)
+ other_project = create(:project)
link['data-project'] = other_project.id.to_s
link['data-author'] = user.id.to_s
diff --git a/spec/lib/ci/charts_spec.rb b/spec/lib/ci/charts_spec.rb
index 8e2d2724426..f0769deef21 100644
--- a/spec/lib/ci/charts_spec.rb
+++ b/spec/lib/ci/charts_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper'
describe Ci::Charts do
context "pipeline_times" do
- let(:project) { create(:empty_project) }
+ let(:project) { create(:project) }
let(:chart) { Ci::Charts::PipelineTime.new(project) }
subject { chart.pipeline_times }
diff --git a/spec/lib/constraints/project_url_constrainer_spec.rb b/spec/lib/constraints/project_url_constrainer_spec.rb
index e4b5dfc574a..92331eb2e5d 100644
--- a/spec/lib/constraints/project_url_constrainer_spec.rb
+++ b/spec/lib/constraints/project_url_constrainer_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
describe ProjectUrlConstrainer do
- let!(:project) { create(:empty_project) }
+ let!(:project) { create(:project) }
let!(:namespace) { project.namespace }
describe '#matches?' do
diff --git a/spec/lib/container_registry/blob_spec.rb b/spec/lib/container_registry/blob_spec.rb
index 175fd2e7e13..c73faa55513 100644
--- a/spec/lib/container_registry/blob_spec.rb
+++ b/spec/lib/container_registry/blob_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper'
describe ContainerRegistry::Blob do
let(:group) { create(:group, name: 'group') }
- let(:project) { create(:empty_project, path: 'test', group: group) }
+ let(:project) { create(:project, path: 'test', group: group) }
let(:repository) do
create(:container_repository, name: 'image',
diff --git a/spec/lib/container_registry/path_spec.rb b/spec/lib/container_registry/path_spec.rb
index c2bcb54210b..84cacdd3f0d 100644
--- a/spec/lib/container_registry/path_spec.rb
+++ b/spec/lib/container_registry/path_spec.rb
@@ -90,7 +90,7 @@ describe ContainerRegistry::Path do
describe '#has_repository?' do
context 'when project exists' do
- let(:project) { create(:empty_project) }
+ let(:project) { create(:project) }
let(:path) { "#{project.full_path}/my/image" }
context 'when path already has matching repository' do
@@ -123,8 +123,8 @@ describe ContainerRegistry::Path do
let(:path) { 'some_group/some_project' }
before do
- create(:empty_project, group: group, name: 'some_project')
- create(:empty_project, name: 'some_project')
+ create(:project, group: group, name: 'some_project')
+ create(:project, name: 'some_project')
end
it 'returns a correct project' do
@@ -142,7 +142,7 @@ describe ContainerRegistry::Path do
context 'when matching multi-level path' do
let(:project) do
- create(:empty_project, group: group, name: 'some_project')
+ create(:project, group: group, name: 'some_project')
end
context 'when using the zero-level path' do
@@ -192,7 +192,7 @@ describe ContainerRegistry::Path do
let(:group) { create(:group, path: 'Some_Group') }
before do
- create(:empty_project, group: group, name: 'some_project')
+ create(:project, group: group, name: 'some_project')
end
context 'when project path equal repository path' do
@@ -235,7 +235,7 @@ describe ContainerRegistry::Path do
let(:group) { create(:group, path: 'SomeGroup') }
before do
- create(:empty_project, group: group, name: 'MyProject')
+ create(:project, group: group, name: 'MyProject')
end
it 'returns downcased project path' do
diff --git a/spec/lib/event_filter_spec.rb b/spec/lib/event_filter_spec.rb
index b1366e74802..b0efcab47fb 100644
--- a/spec/lib/event_filter_spec.rb
+++ b/spec/lib/event_filter_spec.rb
@@ -3,7 +3,7 @@ require 'spec_helper'
describe EventFilter do
describe '#apply_filter' do
let(:source_user) { create(:user) }
- let!(:public_project) { create(:empty_project, :public) }
+ let!(:public_project) { create(:project, :public) }
let!(:push_event) { create(:event, :pushed, project: public_project, target: public_project, author: source_user) }
let!(:merged_event) { create(:event, :merged, project: public_project, target: public_project, author: source_user) }
diff --git a/spec/lib/gitlab/allowable_spec.rb b/spec/lib/gitlab/allowable_spec.rb
index 87733d53e92..9d80d480b52 100644
--- a/spec/lib/gitlab/allowable_spec.rb
+++ b/spec/lib/gitlab/allowable_spec.rb
@@ -9,7 +9,7 @@ describe Gitlab::Allowable do
let(:user) { create(:user) }
context 'when user is allowed to do something' do
- let(:project) { create(:empty_project, :public) }
+ let(:project) { create(:project, :public) }
it 'reports correct ability to perform action' do
expect(subject.can?(user, :read_project, project)).to be true
@@ -17,7 +17,7 @@ describe Gitlab::Allowable do
end
context 'when user is not allowed to do something' do
- let(:project) { create(:empty_project, :private) }
+ let(:project) { create(:project, :private) }
it 'reports correct ability to perform action' do
expect(subject.can?(user, :read_project, project)).to be false
diff --git a/spec/lib/gitlab/auth_spec.rb b/spec/lib/gitlab/auth_spec.rb
index a9db0d5164d..8f57e73e40d 100644
--- a/spec/lib/gitlab/auth_spec.rb
+++ b/spec/lib/gitlab/auth_spec.rb
@@ -65,7 +65,7 @@ describe Gitlab::Auth do
end
it 'recognizes other ci services' do
- project = create(:empty_project)
+ project = create(:project)
project.create_drone_ci_service(active: true)
project.drone_ci_service.update(token: 'token')
diff --git a/spec/lib/gitlab/background_migration/migrate_system_uploads_to_new_folder_spec.rb b/spec/lib/gitlab/background_migration/migrate_system_uploads_to_new_folder_spec.rb
index a910fb105a5..59f69d1e4b1 100644
--- a/spec/lib/gitlab/background_migration/migrate_system_uploads_to_new_folder_spec.rb
+++ b/spec/lib/gitlab/background_migration/migrate_system_uploads_to_new_folder_spec.rb
@@ -9,7 +9,7 @@ describe Gitlab::BackgroundMigration::MigrateSystemUploadsToNewFolder do
describe '#perform' do
it 'renames the path of system-uploads', truncate: true do
- upload = create(:upload, model: create(:empty_project), path: 'uploads/system/project/avatar.jpg')
+ upload = create(:upload, model: create(:project), path: 'uploads/system/project/avatar.jpg')
migration.perform('uploads/system/', 'uploads/-/system/')
diff --git a/spec/lib/gitlab/backup/repository_spec.rb b/spec/lib/gitlab/backup/repository_spec.rb
index 3af69daa585..535cce12780 100644
--- a/spec/lib/gitlab/backup/repository_spec.rb
+++ b/spec/lib/gitlab/backup/repository_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper'
describe Backup::Repository do
let(:progress) { StringIO.new }
- let!(:project) { create(:empty_project) }
+ let!(:project) { create(:project) }
before do
allow(progress).to receive(:puts)
diff --git a/spec/lib/gitlab/badge/coverage/metadata_spec.rb b/spec/lib/gitlab/badge/coverage/metadata_spec.rb
index 5e93935ea37..74eaf7eaf8b 100644
--- a/spec/lib/gitlab/badge/coverage/metadata_spec.rb
+++ b/spec/lib/gitlab/badge/coverage/metadata_spec.rb
@@ -3,7 +3,7 @@ require 'lib/gitlab/badge/shared/metadata'
describe Gitlab::Badge::Coverage::Metadata do
let(:badge) do
- double(project: create(:empty_project), ref: 'feature', job: 'test')
+ double(project: create(:project), ref: 'feature', job: 'test')
end
let(:metadata) { described_class.new(badge) }
diff --git a/spec/lib/gitlab/badge/pipeline/metadata_spec.rb b/spec/lib/gitlab/badge/pipeline/metadata_spec.rb
index d537ce8803c..9032a8e9016 100644
--- a/spec/lib/gitlab/badge/pipeline/metadata_spec.rb
+++ b/spec/lib/gitlab/badge/pipeline/metadata_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper'
require 'lib/gitlab/badge/shared/metadata'
describe Gitlab::Badge::Pipeline::Metadata do
- let(:badge) { double(project: create(:empty_project), ref: 'feature') }
+ let(:badge) { double(project: create(:project), ref: 'feature') }
let(:metadata) { described_class.new(badge) }
it_behaves_like 'badge metadata'
diff --git a/spec/lib/gitlab/bitbucket_import/importer_spec.rb b/spec/lib/gitlab/bitbucket_import/importer_spec.rb
index df66a031fec..d7d6a37f7cf 100644
--- a/spec/lib/gitlab/bitbucket_import/importer_spec.rb
+++ b/spec/lib/gitlab/bitbucket_import/importer_spec.rb
@@ -52,7 +52,7 @@ describe Gitlab::BitbucketImport::Importer do
let(:project) do
create(
- :empty_project,
+ :project,
import_source: project_identifier,
import_data: ProjectImportData.new(credentials: data)
)
diff --git a/spec/lib/gitlab/cache/ci/project_pipeline_status_spec.rb b/spec/lib/gitlab/cache/ci/project_pipeline_status_spec.rb
index 1fab3b29424..f43d89d7ccd 100644
--- a/spec/lib/gitlab/cache/ci/project_pipeline_status_spec.rb
+++ b/spec/lib/gitlab/cache/ci/project_pipeline_status_spec.rb
@@ -195,7 +195,7 @@ describe Gitlab::Cache::Ci::ProjectPipelineStatus, :clean_gitlab_redis_cache do
end
it "doesn't fail for an empty project" do
- status_for_empty_commit = described_class.new(create(:empty_project))
+ status_for_empty_commit = described_class.new(create(:project))
status_for_empty_commit.load_status
@@ -243,7 +243,7 @@ describe Gitlab::Cache::Ci::ProjectPipelineStatus, :clean_gitlab_redis_cache do
end
it "deletes the cache if the repository doesn't have a head commit" do
- empty_project = create(:empty_project)
+ empty_project = create(:project)
Gitlab::Redis::Cache.with do |redis|
redis.mapped_hmset(cache_key,
{ sha: 'sha', status: 'pending', ref: 'master' })
diff --git a/spec/lib/gitlab/ci/status/pipeline/common_spec.rb b/spec/lib/gitlab/ci/status/pipeline/common_spec.rb
index f5fd31e8d03..4a5b45e7cae 100644
--- a/spec/lib/gitlab/ci/status/pipeline/common_spec.rb
+++ b/spec/lib/gitlab/ci/status/pipeline/common_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper'
describe Gitlab::Ci::Status::Pipeline::Common do
let(:user) { create(:user) }
- let(:project) { create(:empty_project, :private) }
+ let(:project) { create(:project, :private) }
let(:pipeline) { create(:ci_pipeline, project: project) }
subject do
diff --git a/spec/lib/gitlab/ci/status/stage/common_spec.rb b/spec/lib/gitlab/ci/status/stage/common_spec.rb
index 8814a7614a0..f5f03ac0395 100644
--- a/spec/lib/gitlab/ci/status/stage/common_spec.rb
+++ b/spec/lib/gitlab/ci/status/stage/common_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper'
describe Gitlab::Ci::Status::Stage::Common do
let(:user) { create(:user) }
- let(:project) { create(:empty_project) }
+ let(:project) { create(:project) }
let(:pipeline) { create(:ci_empty_pipeline, project: project) }
let(:stage) do
diff --git a/spec/lib/gitlab/ci/status/stage/factory_spec.rb b/spec/lib/gitlab/ci/status/stage/factory_spec.rb
index bbb40e2c1ab..432b07e4902 100644
--- a/spec/lib/gitlab/ci/status/stage/factory_spec.rb
+++ b/spec/lib/gitlab/ci/status/stage/factory_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper'
describe Gitlab::Ci::Status::Stage::Factory do
let(:user) { create(:user) }
- let(:project) { create(:empty_project) }
+ let(:project) { create(:project) }
let(:pipeline) { create(:ci_empty_pipeline, project: project) }
let(:stage) do
diff --git a/spec/lib/gitlab/closing_issue_extractor_spec.rb b/spec/lib/gitlab/closing_issue_extractor_spec.rb
index 8ff6125ada1..15012495247 100644
--- a/spec/lib/gitlab/closing_issue_extractor_spec.rb
+++ b/spec/lib/gitlab/closing_issue_extractor_spec.rb
@@ -1,8 +1,8 @@
require 'spec_helper'
describe Gitlab::ClosingIssueExtractor do
- let(:project) { create(:empty_project) }
- let(:project2) { create(:empty_project) }
+ let(:project) { create(:project) }
+ let(:project2) { create(:project) }
let(:forked_project) { Projects::ForkService.new(project, project.creator).execute }
let(:issue) { create(:issue, project: project) }
let(:issue2) { create(:issue, project: project2) }
diff --git a/spec/lib/gitlab/contributions_calendar_spec.rb b/spec/lib/gitlab/contributions_calendar_spec.rb
index 79632e2b6a3..9217d48087e 100644
--- a/spec/lib/gitlab/contributions_calendar_spec.rb
+++ b/spec/lib/gitlab/contributions_calendar_spec.rb
@@ -5,19 +5,19 @@ describe Gitlab::ContributionsCalendar do
let(:user) { create(:user) }
let(:private_project) do
- create(:empty_project, :private) do |project|
+ create(:project, :private) do |project|
create(:project_member, user: contributor, project: project)
end
end
let(:public_project) do
- create(:empty_project, :public) do |project|
+ create(:project, :public) do |project|
create(:project_member, user: contributor, project: project)
end
end
let(:feature_project) do
- create(:empty_project, :public, :issues_private) do |project|
+ create(:project, :public, :issues_private) do |project|
create(:project_member, user: contributor, project: project).project
end
end
diff --git a/spec/lib/gitlab/cycle_analytics/permissions_spec.rb b/spec/lib/gitlab/cycle_analytics/permissions_spec.rb
index 2d85e712db0..2a0dd7be439 100644
--- a/spec/lib/gitlab/cycle_analytics/permissions_spec.rb
+++ b/spec/lib/gitlab/cycle_analytics/permissions_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
describe Gitlab::CycleAnalytics::Permissions do
- let(:project) { create(:empty_project, public_builds: false) }
+ let(:project) { create(:project, public_builds: false) }
let(:user) { create(:user) }
subject { described_class.get(user: user, project: project) }
diff --git a/spec/lib/gitlab/cycle_analytics/shared_event_spec.rb b/spec/lib/gitlab/cycle_analytics/shared_event_spec.rb
index 9c5e57342e9..c22d27f60d6 100644
--- a/spec/lib/gitlab/cycle_analytics/shared_event_spec.rb
+++ b/spec/lib/gitlab/cycle_analytics/shared_event_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
shared_examples 'default query config' do
- let(:project) { create(:empty_project) }
+ let(:project) { create(:project) }
let(:event) { described_class.new(project: project, stage: stage_name, options: { from: 1.day.ago }) }
it 'has the stage attribute' do
diff --git a/spec/lib/gitlab/cycle_analytics/stage_summary_spec.rb b/spec/lib/gitlab/cycle_analytics/stage_summary_spec.rb
index 592448aef96..2e67c1c7f78 100644
--- a/spec/lib/gitlab/cycle_analytics/stage_summary_spec.rb
+++ b/spec/lib/gitlab/cycle_analytics/stage_summary_spec.rb
@@ -15,7 +15,7 @@ describe Gitlab::CycleAnalytics::StageSummary do
end
it "doesn't find issues from other projects" do
- Timecop.freeze(5.days.from_now) { create(:issue, project: create(:empty_project)) }
+ Timecop.freeze(5.days.from_now) { create(:issue, project: create(:project)) }
expect(subject.first[:value]).to eq(0)
end
diff --git a/spec/lib/gitlab/database/migration_helpers_spec.rb b/spec/lib/gitlab/database/migration_helpers_spec.rb
index d3dbd82e8ba..ec2274a70aa 100644
--- a/spec/lib/gitlab/database/migration_helpers_spec.rb
+++ b/spec/lib/gitlab/database/migration_helpers_spec.rb
@@ -276,7 +276,7 @@ describe Gitlab::Database::MigrationHelpers do
before do
expect(model).to receive(:transaction_open?).and_return(false)
- create_list(:empty_project, 5)
+ create_list(:project, 5)
end
it 'updates all the rows in a table' do
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
diff --git a/spec/lib/gitlab/email/attachment_uploader_spec.rb b/spec/lib/gitlab/email/attachment_uploader_spec.rb
index 89258d2eca7..f61dbc67ad1 100644
--- a/spec/lib/gitlab/email/attachment_uploader_spec.rb
+++ b/spec/lib/gitlab/email/attachment_uploader_spec.rb
@@ -2,7 +2,7 @@ require "spec_helper"
describe Gitlab::Email::AttachmentUploader do
describe "#execute" do
- let(:project) { build(:empty_project) }
+ let(:project) { build(:project) }
let(:message_raw) { fixture_file("emails/attachment.eml") }
let(:message) { Mail::Message.new(message_raw) }
diff --git a/spec/lib/gitlab/email/handler/create_issue_handler_spec.rb b/spec/lib/gitlab/email/handler/create_issue_handler_spec.rb
index 6d0e715e889..bd36d1d309d 100644
--- a/spec/lib/gitlab/email/handler/create_issue_handler_spec.rb
+++ b/spec/lib/gitlab/email/handler/create_issue_handler_spec.rb
@@ -69,7 +69,7 @@ describe Gitlab::Email::Handler::CreateIssueHandler do
end
context "when project is private" do
- let(:project) { create(:empty_project, :private, namespace: namespace) }
+ let(:project) { create(:project, :private, namespace: namespace) }
it "raises a ProjectNotFound if the user is not a member" do
expect { receiver.execute }.to raise_error(Gitlab::Email::ProjectNotFound)
diff --git a/spec/lib/gitlab/email/handler/unsubscribe_handler_spec.rb b/spec/lib/gitlab/email/handler/unsubscribe_handler_spec.rb
index 66c38498e4e..21796694f26 100644
--- a/spec/lib/gitlab/email/handler/unsubscribe_handler_spec.rb
+++ b/spec/lib/gitlab/email/handler/unsubscribe_handler_spec.rb
@@ -10,7 +10,7 @@ describe Gitlab::Email::Handler::UnsubscribeHandler do
end
let(:email_raw) { fixture_file('emails/valid_reply.eml').gsub(mail_key, "#{mail_key}+unsubscribe") }
- let(:project) { create(:empty_project, :public) }
+ let(:project) { create(:project, :public) }
let(:user) { create(:user) }
let(:noteable) { create(:issue, project: project) }
diff --git a/spec/lib/gitlab/gfm/reference_rewriter_spec.rb b/spec/lib/gitlab/gfm/reference_rewriter_spec.rb
index eaec699ad90..a3d323fe28a 100644
--- a/spec/lib/gitlab/gfm/reference_rewriter_spec.rb
+++ b/spec/lib/gitlab/gfm/reference_rewriter_spec.rb
@@ -2,8 +2,8 @@ require 'spec_helper'
describe Gitlab::Gfm::ReferenceRewriter do
let(:text) { 'some text' }
- let(:old_project) { create(:empty_project, name: 'old-project') }
- let(:new_project) { create(:empty_project, name: 'new-project') }
+ let(:old_project) { create(:project, name: 'old-project') }
+ let(:new_project) { create(:project, name: 'new-project') }
let(:user) { create(:user) }
before do
diff --git a/spec/lib/gitlab/gfm/uploads_rewriter_spec.rb b/spec/lib/gitlab/gfm/uploads_rewriter_spec.rb
index fef456eb416..39e3b875c49 100644
--- a/spec/lib/gitlab/gfm/uploads_rewriter_spec.rb
+++ b/spec/lib/gitlab/gfm/uploads_rewriter_spec.rb
@@ -2,8 +2,8 @@ require 'spec_helper'
describe Gitlab::Gfm::UploadsRewriter do
let(:user) { create(:user) }
- let(:old_project) { create(:empty_project) }
- let(:new_project) { create(:empty_project) }
+ let(:old_project) { create(:project) }
+ let(:new_project) { create(:project) }
let(:rewriter) { described_class.new(text, old_project, user) }
context 'text contains links to uploads' do
diff --git a/spec/lib/gitlab/gitaly_client/notification_service_spec.rb b/spec/lib/gitlab/gitaly_client/notification_service_spec.rb
index 1bcdd5e5497..ffc3a09be30 100644
--- a/spec/lib/gitlab/gitaly_client/notification_service_spec.rb
+++ b/spec/lib/gitlab/gitaly_client/notification_service_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper'
describe Gitlab::GitalyClient::NotificationService do
describe '#post_receive' do
- let(:project) { create(:empty_project) }
+ let(:project) { create(:project) }
let(:storage_name) { project.repository_storage }
let(:relative_path) { project.disk_path + '.git' }
subject { described_class.new(project.repository) }
diff --git a/spec/lib/gitlab/gitaly_client/ref_service_spec.rb b/spec/lib/gitlab/gitaly_client/ref_service_spec.rb
index 2ad24119476..46efc1b18f0 100644
--- a/spec/lib/gitlab/gitaly_client/ref_service_spec.rb
+++ b/spec/lib/gitlab/gitaly_client/ref_service_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
describe Gitlab::GitalyClient::RefService do
- let(:project) { create(:empty_project) }
+ let(:project) { create(:project) }
let(:storage_name) { project.repository_storage }
let(:relative_path) { project.disk_path + '.git' }
let(:client) { described_class.new(project.repository) }
diff --git a/spec/lib/gitlab/gitaly_client/repository_service_spec.rb b/spec/lib/gitlab/gitaly_client/repository_service_spec.rb
index 5a9f3fc130c..5c9c4ed1d7c 100644
--- a/spec/lib/gitlab/gitaly_client/repository_service_spec.rb
+++ b/spec/lib/gitlab/gitaly_client/repository_service_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
describe Gitlab::GitalyClient::RepositoryService do
- set(:project) { create(:empty_project) }
+ set(:project) { create(:project) }
let(:storage_name) { project.repository_storage }
let(:relative_path) { project.path_with_namespace + '.git' }
let(:client) { described_class.new(project.repository) }
diff --git a/spec/lib/gitlab/github_import/comment_formatter_spec.rb b/spec/lib/gitlab/github_import/comment_formatter_spec.rb
index ef89634685a..035ac8c7c1f 100644
--- a/spec/lib/gitlab/github_import/comment_formatter_spec.rb
+++ b/spec/lib/gitlab/github_import/comment_formatter_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper'
describe Gitlab::GithubImport::CommentFormatter do
let(:client) { double }
- let(:project) { create(:empty_project) }
+ let(:project) { create(:project) }
let(:octocat) { double(id: 123456, login: 'octocat', email: 'octocat@example.com') }
let(:created_at) { DateTime.strptime('2013-04-10T20:09:31Z') }
let(:updated_at) { DateTime.strptime('2014-03-03T18:58:10Z') }
diff --git a/spec/lib/gitlab/github_import/issue_formatter_spec.rb b/spec/lib/gitlab/github_import/issue_formatter_spec.rb
index 39b15926193..0fc56d92aa6 100644
--- a/spec/lib/gitlab/github_import/issue_formatter_spec.rb
+++ b/spec/lib/gitlab/github_import/issue_formatter_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper'
describe Gitlab::GithubImport::IssueFormatter do
let(:client) { double }
- let!(:project) { create(:empty_project, namespace: create(:namespace, path: 'octocat')) }
+ let!(:project) { create(:project, namespace: create(:namespace, path: 'octocat')) }
let(:octocat) { double(id: 123456, login: 'octocat', email: 'octocat@example.com') }
let(:created_at) { DateTime.strptime('2011-01-26T19:01:12Z') }
let(:updated_at) { DateTime.strptime('2011-01-27T19:01:12Z') }
diff --git a/spec/lib/gitlab/github_import/label_formatter_spec.rb b/spec/lib/gitlab/github_import/label_formatter_spec.rb
index 2cc7ac0b446..83fdd2cc415 100644
--- a/spec/lib/gitlab/github_import/label_formatter_spec.rb
+++ b/spec/lib/gitlab/github_import/label_formatter_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
describe Gitlab::GithubImport::LabelFormatter do
- let(:project) { create(:empty_project) }
+ let(:project) { create(:project) }
let(:raw) { double(name: 'improvements', color: 'e6e6e6') }
subject { described_class.new(project, raw) }
diff --git a/spec/lib/gitlab/github_import/milestone_formatter_spec.rb b/spec/lib/gitlab/github_import/milestone_formatter_spec.rb
index 310e0536fd7..683fa51b78e 100644
--- a/spec/lib/gitlab/github_import/milestone_formatter_spec.rb
+++ b/spec/lib/gitlab/github_import/milestone_formatter_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
describe Gitlab::GithubImport::MilestoneFormatter do
- let(:project) { create(:empty_project) }
+ let(:project) { create(:project) }
let(:created_at) { DateTime.strptime('2011-01-26T19:01:12Z') }
let(:updated_at) { DateTime.strptime('2011-01-27T19:01:12Z') }
let(:base_data) do
diff --git a/spec/lib/gitlab/github_import/release_formatter_spec.rb b/spec/lib/gitlab/github_import/release_formatter_spec.rb
index 1357cb636ae..926bf725d6a 100644
--- a/spec/lib/gitlab/github_import/release_formatter_spec.rb
+++ b/spec/lib/gitlab/github_import/release_formatter_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
describe Gitlab::GithubImport::ReleaseFormatter do
- let!(:project) { create(:empty_project, namespace: create(:namespace, path: 'octocat')) }
+ let!(:project) { create(:project, namespace: create(:namespace, path: 'octocat')) }
let(:octocat) { double(id: 123456, login: 'octocat') }
let(:created_at) { DateTime.strptime('2011-01-26T19:01:12Z') }
diff --git a/spec/lib/gitlab/github_import/wiki_formatter_spec.rb b/spec/lib/gitlab/github_import/wiki_formatter_spec.rb
index 119bf2b5662..fcd90fab547 100644
--- a/spec/lib/gitlab/github_import/wiki_formatter_spec.rb
+++ b/spec/lib/gitlab/github_import/wiki_formatter_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper'
describe Gitlab::GithubImport::WikiFormatter do
let(:project) do
- create(:empty_project,
+ create(:project,
namespace: create(:namespace, path: 'gitlabhq'),
import_url: 'https://xxx@github.com/gitlabhq/sample.gitlabhq.git')
end
diff --git a/spec/lib/gitlab/gitlab_import/importer_spec.rb b/spec/lib/gitlab/gitlab_import/importer_spec.rb
index 16b14474b89..e1d935602b5 100644
--- a/spec/lib/gitlab/gitlab_import/importer_spec.rb
+++ b/spec/lib/gitlab/gitlab_import/importer_spec.rb
@@ -24,7 +24,7 @@ describe Gitlab::GitlabImport::Importer do
end
it 'persists issues' do
- project = create(:empty_project, import_source: 'asd/vim')
+ project = create(:project, import_source: 'asd/vim')
project.build_import_data(credentials: { password: 'password' })
subject = described_class.new(project)
diff --git a/spec/lib/gitlab/google_code_import/importer_spec.rb b/spec/lib/gitlab/google_code_import/importer_spec.rb
index 85f40825005..798ea0bac58 100644
--- a/spec/lib/gitlab/google_code_import/importer_spec.rb
+++ b/spec/lib/gitlab/google_code_import/importer_spec.rb
@@ -10,7 +10,7 @@ describe Gitlab::GoogleCodeImport::Importer do
'user_map' => { 'thilo...' => "@#{mapped_user.username}" }
}
end
- let(:project) { create(:empty_project) }
+ let(:project) { create(:project) }
subject { described_class.new(project) }
diff --git a/spec/lib/gitlab/graphs/commits_spec.rb b/spec/lib/gitlab/graphs/commits_spec.rb
index 3f9382a9143..b2084f56640 100644
--- a/spec/lib/gitlab/graphs/commits_spec.rb
+++ b/spec/lib/gitlab/graphs/commits_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
describe Gitlab::Graphs::Commits do
- let!(:project) { create(:empty_project, :public) }
+ let!(:project) { create(:project, :public) }
let!(:commit1) { create(:commit, git_commit: RepoHelpers.sample_commit, project: project, committed_date: Time.now) }
let!(:commit1_yesterday) { create(:commit, git_commit: RepoHelpers.sample_commit, project: project, committed_date: 1.day.ago)}
diff --git a/spec/lib/gitlab/identifier_spec.rb b/spec/lib/gitlab/identifier_spec.rb
index 29912da2e25..cfaeb1f0d4f 100644
--- a/spec/lib/gitlab/identifier_spec.rb
+++ b/spec/lib/gitlab/identifier_spec.rb
@@ -5,7 +5,7 @@ describe Gitlab::Identifier do
Class.new { include Gitlab::Identifier }.new
end
- let(:project) { create(:empty_project) }
+ let(:project) { create(:project) }
let(:user) { create(:user) }
let(:key) { create(:key, user: user) }
diff --git a/spec/lib/gitlab/import_export/avatar_restorer_spec.rb b/spec/lib/gitlab/import_export/avatar_restorer_spec.rb
index a7b292c8558..a93a921e459 100644
--- a/spec/lib/gitlab/import_export/avatar_restorer_spec.rb
+++ b/spec/lib/gitlab/import_export/avatar_restorer_spec.rb
@@ -4,7 +4,7 @@ describe Gitlab::ImportExport::AvatarRestorer do
include UploadHelpers
let(:shared) { Gitlab::ImportExport::Shared.new(relative_path: 'test') }
- let(:project) { create(:empty_project) }
+ let(:project) { create(:project) }
before do
allow_any_instance_of(described_class).to receive(:avatar_export_file)
diff --git a/spec/lib/gitlab/import_export/avatar_saver_spec.rb b/spec/lib/gitlab/import_export/avatar_saver_spec.rb
index 814f85de03b..3fb5ddde8b5 100644
--- a/spec/lib/gitlab/import_export/avatar_saver_spec.rb
+++ b/spec/lib/gitlab/import_export/avatar_saver_spec.rb
@@ -3,8 +3,8 @@ require 'spec_helper'
describe Gitlab::ImportExport::AvatarSaver do
let(:shared) { Gitlab::ImportExport::Shared.new(relative_path: 'test') }
let(:export_path) { "#{Dir.tmpdir}/project_tree_saver_spec" }
- let(:project_with_avatar) { create(:empty_project, avatar: fixture_file_upload(Rails.root + "spec/fixtures/dk.png", "image/png")) }
- let(:project) { create(:empty_project) }
+ let(:project_with_avatar) { create(:project, avatar: fixture_file_upload(Rails.root + "spec/fixtures/dk.png", "image/png")) }
+ let(:project) { create(:project) }
before do
FileUtils.mkdir_p("#{shared.export_path}/avatar/")
diff --git a/spec/lib/gitlab/import_export/fork_spec.rb b/spec/lib/gitlab/import_export/fork_spec.rb
index 230cc2d3006..c7fbc2bc92f 100644
--- a/spec/lib/gitlab/import_export/fork_spec.rb
+++ b/spec/lib/gitlab/import_export/fork_spec.rb
@@ -3,7 +3,7 @@ require 'spec_helper'
describe 'forked project import' do
let(:user) { create(:user) }
let!(:project_with_repo) { create(:project, :repository, name: 'test-repo-restorer', path: 'test-repo-restorer') }
- let!(:project) { create(:empty_project, name: 'test-repo-restorer-no-repo', path: 'test-repo-restorer-no-repo') }
+ let!(:project) { create(:project, name: 'test-repo-restorer-no-repo', path: 'test-repo-restorer-no-repo') }
let(:export_path) { "#{Dir.tmpdir}/project_tree_saver_spec" }
let(:shared) { Gitlab::ImportExport::Shared.new(relative_path: project.full_path) }
let(:forked_from_project) { create(:project, :repository) }
diff --git a/spec/lib/gitlab/import_export/import_export_spec.rb b/spec/lib/gitlab/import_export/import_export_spec.rb
index 07415d41f93..40a5f2294a2 100644
--- a/spec/lib/gitlab/import_export/import_export_spec.rb
+++ b/spec/lib/gitlab/import_export/import_export_spec.rb
@@ -3,7 +3,7 @@ require 'spec_helper'
describe Gitlab::ImportExport do
describe 'export filename' do
let(:group) { create(:group, :nested) }
- let(:project) { create(:empty_project, :public, path: 'project-path', namespace: group) }
+ let(:project) { create(:project, :public, path: 'project-path', namespace: group) }
it 'contains the project path' do
expect(described_class.export_filename(project: project)).to include(project.path)
diff --git a/spec/lib/gitlab/import_export/members_mapper_spec.rb b/spec/lib/gitlab/import_export/members_mapper_spec.rb
index f66a2ab7dda..246f009ad27 100644
--- a/spec/lib/gitlab/import_export/members_mapper_spec.rb
+++ b/spec/lib/gitlab/import_export/members_mapper_spec.rb
@@ -3,7 +3,7 @@ require 'spec_helper'
describe Gitlab::ImportExport::MembersMapper do
describe 'map members' do
let(:user) { create(:admin) }
- let(:project) { create(:empty_project, :public, name: 'searchable_project') }
+ let(:project) { create(:project, :public, name: 'searchable_project') }
let(:user2) { create(:user) }
let(:exported_user_id) { 99 }
let(:exported_members) do
@@ -96,7 +96,7 @@ describe Gitlab::ImportExport::MembersMapper do
context 'importer same as group member' do
let(:user2) { create(:admin) }
let(:group) { create(:group) }
- let(:project) { create(:empty_project, :public, name: 'searchable_project', namespace: group) }
+ let(:project) { create(:project, :public, name: 'searchable_project', namespace: group) }
let(:members_mapper) do
described_class.new(
exported_members: exported_members, user: user2, project: project)
@@ -119,7 +119,7 @@ describe Gitlab::ImportExport::MembersMapper do
context 'importing group members' do
let(:group) { create(:group) }
- let(:project) { create(:empty_project, namespace: group) }
+ let(:project) { create(:project, namespace: group) }
let(:members_mapper) do
described_class.new(
exported_members: exported_members, user: user, project: project)
diff --git a/spec/lib/gitlab/import_export/project_tree_restorer_spec.rb b/spec/lib/gitlab/import_export/project_tree_restorer_spec.rb
index d1ec0e45bbd..7ee0e22f28d 100644
--- a/spec/lib/gitlab/import_export/project_tree_restorer_spec.rb
+++ b/spec/lib/gitlab/import_export/project_tree_restorer_spec.rb
@@ -9,7 +9,7 @@ describe Gitlab::ImportExport::ProjectTreeRestorer do
RSpec::Mocks.with_temporary_scope do
@shared = Gitlab::ImportExport::Shared.new(relative_path: "", project_path: 'path')
allow(@shared).to receive(:export_path).and_return('spec/lib/gitlab/import_export/')
- @project = create(:empty_project, :builds_disabled, :issues_disabled, name: 'project', path: 'project')
+ @project = create(:project, :builds_disabled, :issues_disabled, name: 'project', path: 'project')
project_tree_restorer = described_class.new(user: @user, shared: @shared, project: @project)
@restored_project_json = project_tree_restorer.restore
end
@@ -178,7 +178,7 @@ describe Gitlab::ImportExport::ProjectTreeRestorer do
context 'Light JSON' do
let(:user) { create(:user) }
let(:shared) { Gitlab::ImportExport::Shared.new(relative_path: "", project_path: 'path') }
- let!(:project) { create(:empty_project, :builds_disabled, :issues_disabled, name: 'project', path: 'project') }
+ let!(:project) { create(:project, :builds_disabled, :issues_disabled, name: 'project', path: 'project') }
let(:project_tree_restorer) { described_class.new(user: user, shared: shared, project: project) }
let(:restored_project_json) { project_tree_restorer.restore }
@@ -210,7 +210,7 @@ describe Gitlab::ImportExport::ProjectTreeRestorer do
context 'with group' do
let!(:project) do
- create(:empty_project,
+ create(:project,
:builds_disabled,
:issues_disabled,
name: 'project',
diff --git a/spec/lib/gitlab/import_export/relation_factory_spec.rb b/spec/lib/gitlab/import_export/relation_factory_spec.rb
index baa90af84f7..f1df44cea75 100644
--- a/spec/lib/gitlab/import_export/relation_factory_spec.rb
+++ b/spec/lib/gitlab/import_export/relation_factory_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
describe Gitlab::ImportExport::RelationFactory do
- let(:project) { create(:empty_project) }
+ let(:project) { create(:project) }
let(:members_mapper) { double('members_mapper').as_null_object }
let(:user) { create(:admin) }
let(:created_object) do
diff --git a/spec/lib/gitlab/import_export/repo_restorer_spec.rb b/spec/lib/gitlab/import_export/repo_restorer_spec.rb
index d57833c3fec..2786bc92fe5 100644
--- a/spec/lib/gitlab/import_export/repo_restorer_spec.rb
+++ b/spec/lib/gitlab/import_export/repo_restorer_spec.rb
@@ -4,7 +4,7 @@ describe Gitlab::ImportExport::RepoRestorer do
describe 'bundle a project Git repo' do
let(:user) { create(:user) }
let!(:project_with_repo) { create(:project, :repository, name: 'test-repo-restorer', path: 'test-repo-restorer') }
- let!(:project) { create(:empty_project) }
+ let!(:project) { create(:project) }
let(:export_path) { "#{Dir.tmpdir}/project_tree_saver_spec" }
let(:shared) { Gitlab::ImportExport::Shared.new(relative_path: project.full_path) }
let(:bundler) { Gitlab::ImportExport::RepoSaver.new(project: project_with_repo, shared: shared) }
diff --git a/spec/lib/gitlab/import_export/repo_saver_spec.rb b/spec/lib/gitlab/import_export/repo_saver_spec.rb
index 0ba199bbb05..e6ad516deef 100644
--- a/spec/lib/gitlab/import_export/repo_saver_spec.rb
+++ b/spec/lib/gitlab/import_export/repo_saver_spec.rb
@@ -3,7 +3,7 @@ require 'spec_helper'
describe Gitlab::ImportExport::RepoSaver do
describe 'bundle a project Git repo' do
let(:user) { create(:user) }
- let!(:project) { create(:empty_project, :public, name: 'searchable_project') }
+ let!(:project) { create(:project, :public, name: 'searchable_project') }
let(:export_path) { "#{Dir.tmpdir}/project_tree_saver_spec" }
let(:shared) { Gitlab::ImportExport::Shared.new(relative_path: project.full_path) }
let(:bundler) { described_class.new(project: project, shared: shared) }
diff --git a/spec/lib/gitlab/import_export/wiki_repo_saver_spec.rb b/spec/lib/gitlab/import_export/wiki_repo_saver_spec.rb
index caf08e674d3..0e55993c8ef 100644
--- a/spec/lib/gitlab/import_export/wiki_repo_saver_spec.rb
+++ b/spec/lib/gitlab/import_export/wiki_repo_saver_spec.rb
@@ -3,7 +3,7 @@ require 'spec_helper'
describe Gitlab::ImportExport::WikiRepoSaver do
describe 'bundle a wiki Git repo' do
let(:user) { create(:user) }
- let!(:project) { create(:empty_project, :public, name: 'searchable_project') }
+ let!(:project) { create(:project, :public, name: 'searchable_project') }
let(:export_path) { "#{Dir.tmpdir}/project_tree_saver_spec" }
let(:shared) { Gitlab::ImportExport::Shared.new(relative_path: project.full_path) }
let(:wiki_bundler) { described_class.new(project: project, shared: shared) }
diff --git a/spec/lib/gitlab/issuable_sorter_spec.rb b/spec/lib/gitlab/issuable_sorter_spec.rb
index c4138c063c8..642a6cb6caa 100644
--- a/spec/lib/gitlab/issuable_sorter_spec.rb
+++ b/spec/lib/gitlab/issuable_sorter_spec.rb
@@ -2,16 +2,16 @@ require 'spec_helper'
describe Gitlab::IssuableSorter do
let(:namespace1) { build_stubbed(:namespace, id: 1) }
- let(:project1) { build_stubbed(:empty_project, id: 1, namespace: namespace1) }
+ let(:project1) { build_stubbed(:project, id: 1, namespace: namespace1) }
- let(:project2) { build_stubbed(:empty_project, id: 2, path: "a", namespace: project1.namespace) }
- let(:project3) { build_stubbed(:empty_project, id: 3, path: "b", namespace: project1.namespace) }
+ let(:project2) { build_stubbed(:project, id: 2, path: "a", namespace: project1.namespace) }
+ let(:project3) { build_stubbed(:project, id: 3, path: "b", namespace: project1.namespace) }
let(:namespace2) { build_stubbed(:namespace, id: 2, path: "a") }
let(:namespace3) { build_stubbed(:namespace, id: 3, path: "b") }
- let(:project4) { build_stubbed(:empty_project, id: 4, path: "a", namespace: namespace2) }
- let(:project5) { build_stubbed(:empty_project, id: 5, path: "b", namespace: namespace2) }
- let(:project6) { build_stubbed(:empty_project, id: 6, path: "a", namespace: namespace3) }
+ let(:project4) { build_stubbed(:project, id: 4, path: "a", namespace: namespace2) }
+ let(:project5) { build_stubbed(:project, id: 5, path: "b", namespace: namespace2) }
+ let(:project6) { build_stubbed(:project, id: 6, path: "a", namespace: namespace3) }
let(:unsorted) { [sorted[2], sorted[3], sorted[0], sorted[1]] }
diff --git a/spec/lib/gitlab/middleware/go_spec.rb b/spec/lib/gitlab/middleware/go_spec.rb
index de4c8b68ffa..6af1564da19 100644
--- a/spec/lib/gitlab/middleware/go_spec.rb
+++ b/spec/lib/gitlab/middleware/go_spec.rb
@@ -18,7 +18,7 @@ describe Gitlab::Middleware::Go do
let(:current_user) { nil }
context 'with simple 2-segment project path' do
- let!(:project) { create(:empty_project, :private) }
+ let!(:project) { create(:project, :private) }
context 'with subpackages' do
let(:path) { "#{project.full_path}/subpackage" }
@@ -39,7 +39,7 @@ describe Gitlab::Middleware::Go do
context 'with a nested project path' do
let(:group) { create(:group, :nested) }
- let!(:project) { create(:empty_project, :public, namespace: group) }
+ let!(:project) { create(:project, :public, namespace: group) }
shared_examples 'a nested project' do
context 'when the project is public' do
diff --git a/spec/lib/gitlab/project_authorizations_spec.rb b/spec/lib/gitlab/project_authorizations_spec.rb
index 9ce33685697..953cfbb8b88 100644
--- a/spec/lib/gitlab/project_authorizations_spec.rb
+++ b/spec/lib/gitlab/project_authorizations_spec.rb
@@ -2,9 +2,9 @@ require 'spec_helper'
describe Gitlab::ProjectAuthorizations do
let(:group) { create(:group) }
- let!(:owned_project) { create(:empty_project) }
- let!(:other_project) { create(:empty_project) }
- let!(:group_project) { create(:empty_project, namespace: group) }
+ let!(:owned_project) { create(:project) }
+ let!(:other_project) { create(:project) }
+ let!(:group_project) { create(:project, namespace: group) }
let(:user) { owned_project.namespace.owner }
@@ -49,7 +49,7 @@ describe Gitlab::ProjectAuthorizations do
if Group.supports_nested_groups?
context 'with nested groups' do
let!(:nested_group) { create(:group, parent: group) }
- let!(:nested_project) { create(:empty_project, namespace: nested_group) }
+ let!(:nested_project) { create(:project, namespace: nested_group) }
it 'includes nested groups' do
expect(authorizations.pluck(:project_id)).to include(nested_project.id)
diff --git a/spec/lib/gitlab/project_search_results_spec.rb b/spec/lib/gitlab/project_search_results_spec.rb
index 7851beb956b..9c3e7d7e9ba 100644
--- a/spec/lib/gitlab/project_search_results_spec.rb
+++ b/spec/lib/gitlab/project_search_results_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper'
describe Gitlab::ProjectSearchResults do
let(:user) { create(:user) }
- let(:project) { create(:empty_project) }
+ let(:project) { create(:project) }
let(:query) { 'hello world' }
describe 'initialize with empty ref' do
@@ -100,14 +100,14 @@ describe Gitlab::ProjectSearchResults do
end
describe 'wiki search' do
- let(:project) { create(:empty_project, :public) }
+ let(:project) { create(:project, :public) }
let(:wiki) { build(:project_wiki, project: project) }
let!(:wiki_page) { wiki.create_page('Title', 'Content') }
subject(:results) { described_class.new(user, project, 'Content').objects('wiki_blobs') }
context 'when wiki is disabled' do
- let(:project) { create(:empty_project, :public, :wiki_disabled) }
+ let(:project) { create(:project, :public, :wiki_disabled) }
it 'hides wiki blobs from members' do
project.add_reporter(user)
@@ -121,7 +121,7 @@ describe Gitlab::ProjectSearchResults do
end
context 'when wiki is internal' do
- let(:project) { create(:empty_project, :public, :wiki_private) }
+ let(:project) { create(:project, :public, :wiki_private) }
it 'finds wiki blobs for guest' do
project.add_guest(user)
@@ -154,7 +154,7 @@ describe Gitlab::ProjectSearchResults do
let(:non_member) { create(:user) }
let(:member) { create(:user) }
let(:admin) { create(:admin) }
- let(:project) { create(:empty_project, :internal) }
+ let(:project) { create(:project, :internal) }
let!(:issue) { create(:issue, project: project, title: 'Issue 1') }
let!(:security_issue_1) { create(:issue, :confidential, project: project, title: 'Security issue 1', author: author) }
let!(:security_issue_2) { create(:issue, :confidential, title: 'Security issue 2', project: project, assignees: [assignee]) }
@@ -226,7 +226,7 @@ describe Gitlab::ProjectSearchResults do
describe 'notes search' do
it 'lists notes' do
- project = create(:empty_project, :public)
+ project = create(:project, :public)
note = create(:note, project: project)
results = described_class.new(user, project, note.note)
@@ -235,7 +235,7 @@ describe Gitlab::ProjectSearchResults do
end
it "doesn't list issue notes when access is restricted" do
- project = create(:empty_project, :public, :issues_private)
+ project = create(:project, :public, :issues_private)
note = create(:note_on_issue, project: project)
results = described_class.new(user, project, note.note)
@@ -244,7 +244,7 @@ describe Gitlab::ProjectSearchResults do
end
it "doesn't list merge_request notes when access is restricted" do
- project = create(:empty_project, :public, :merge_requests_private)
+ project = create(:project, :public, :merge_requests_private)
note = create(:note_on_merge_request, project: project)
results = described_class.new(user, project, note.note)
diff --git a/spec/lib/gitlab/reference_extractor_spec.rb b/spec/lib/gitlab/reference_extractor_spec.rb
index 1a0357534f2..476a3f1998d 100644
--- a/spec/lib/gitlab/reference_extractor_spec.rb
+++ b/spec/lib/gitlab/reference_extractor_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
describe Gitlab::ReferenceExtractor do
- let(:project) { create(:empty_project) }
+ let(:project) { create(:project) }
before do
project.team << [project.creator, :developer]
@@ -215,7 +215,7 @@ describe Gitlab::ReferenceExtractor do
end
context 'with a project with an underscore' do
- let(:other_project) { create(:empty_project, path: 'test_project') }
+ let(:other_project) { create(:project, path: 'test_project') }
let(:issue) { create(:issue, project: other_project) }
before do
diff --git a/spec/lib/gitlab/repo_path_spec.rb b/spec/lib/gitlab/repo_path_spec.rb
index 6336f4a7125..1a925a15e0c 100644
--- a/spec/lib/gitlab/repo_path_spec.rb
+++ b/spec/lib/gitlab/repo_path_spec.rb
@@ -65,7 +65,7 @@ describe ::Gitlab::RepoPath do
end
describe '.find_project' do
- let(:project) { create(:empty_project) }
+ let(:project) { create(:project) }
let(:redirect) { project.route.create_redirect('foo/bar/baz') }
context 'when finding a project by its canonical path' do
diff --git a/spec/lib/gitlab/search_results_spec.rb b/spec/lib/gitlab/search_results_spec.rb
index 31c3cd4d53c..4c5efbde69a 100644
--- a/spec/lib/gitlab/search_results_spec.rb
+++ b/spec/lib/gitlab/search_results_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper'
describe Gitlab::SearchResults do
let(:user) { create(:user) }
- let!(:project) { create(:empty_project, name: 'foo') }
+ let!(:project) { create(:project, name: 'foo') }
let!(:issue) { create(:issue, project: project, title: 'foo') }
let!(:merge_request) do
@@ -42,7 +42,7 @@ describe Gitlab::SearchResults do
end
it 'includes merge requests from source and target projects' do
- forked_project = create(:empty_project, forked_from_project: project)
+ forked_project = create(:project, forked_from_project: project)
merge_request_2 = create(:merge_request, target_project: project, source_project: forked_project, title: 'foo')
results = described_class.new(user, Project.where(id: forked_project.id), 'foo')
@@ -52,17 +52,17 @@ describe Gitlab::SearchResults do
end
it 'does not list issues on private projects' do
- private_project = create(:empty_project, :private)
+ private_project = create(:project, :private)
issue = create(:issue, project: private_project, title: 'foo')
expect(results.objects('issues')).not_to include issue
end
describe 'confidential issues' do
- let(:project_1) { create(:empty_project, :internal) }
- let(:project_2) { create(:empty_project, :internal) }
- let(:project_3) { create(:empty_project, :internal) }
- let(:project_4) { create(:empty_project, :internal) }
+ let(:project_1) { create(:project, :internal) }
+ let(:project_2) { create(:project, :internal) }
+ let(:project_3) { create(:project, :internal) }
+ let(:project_4) { create(:project, :internal) }
let(:query) { 'issue' }
let(:limit_projects) { Project.where(id: [project_1.id, project_2.id, project_3.id]) }
let(:author) { create(:user) }
diff --git a/spec/lib/gitlab/slash_commands/command_spec.rb b/spec/lib/gitlab/slash_commands/command_spec.rb
index 88f73bf90cd..0173a45d480 100644
--- a/spec/lib/gitlab/slash_commands/command_spec.rb
+++ b/spec/lib/gitlab/slash_commands/command_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
describe Gitlab::SlashCommands::Command do
- let(:project) { create(:empty_project) }
+ let(:project) { create(:project) }
let(:user) { create(:user) }
describe '#execute' do
@@ -11,7 +11,7 @@ describe Gitlab::SlashCommands::Command do
context 'when no command is available' do
let(:params) { { text: 'issue show 1' } }
- let(:project) { create(:empty_project, has_external_issue_tracker: true) }
+ let(:project) { create(:project, has_external_issue_tracker: true) }
it 'displays 404 messages' do
expect(subject[:response_type]).to be(:ephemeral)
diff --git a/spec/lib/gitlab/slash_commands/deploy_spec.rb b/spec/lib/gitlab/slash_commands/deploy_spec.rb
index c3fb7d5adea..74b5ef4bb26 100644
--- a/spec/lib/gitlab/slash_commands/deploy_spec.rb
+++ b/spec/lib/gitlab/slash_commands/deploy_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper'
describe Gitlab::SlashCommands::Deploy do
describe '#execute' do
- let(:project) { create(:empty_project) }
+ let(:project) { create(:project) }
let(:user) { create(:user) }
let(:regex_match) { described_class.match('deploy staging to production') }
diff --git a/spec/lib/gitlab/slash_commands/issue_new_spec.rb b/spec/lib/gitlab/slash_commands/issue_new_spec.rb
index 5dfb1b506bc..75ae58d0582 100644
--- a/spec/lib/gitlab/slash_commands/issue_new_spec.rb
+++ b/spec/lib/gitlab/slash_commands/issue_new_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper'
describe Gitlab::SlashCommands::IssueNew do
describe '#execute' do
- let(:project) { create(:empty_project) }
+ let(:project) { create(:project) }
let(:user) { create(:user) }
let(:regex_match) { described_class.match("issue create bird is the word") }
diff --git a/spec/lib/gitlab/slash_commands/issue_search_spec.rb b/spec/lib/gitlab/slash_commands/issue_search_spec.rb
index e5409fe2339..51f59216413 100644
--- a/spec/lib/gitlab/slash_commands/issue_search_spec.rb
+++ b/spec/lib/gitlab/slash_commands/issue_search_spec.rb
@@ -4,7 +4,7 @@ describe Gitlab::SlashCommands::IssueSearch do
describe '#execute' do
let!(:issue) { create(:issue, project: project, title: 'find me') }
let!(:confidential) { create(:issue, :confidential, project: project, title: 'mepmep find') }
- let(:project) { create(:empty_project) }
+ let(:project) { create(:project) }
let(:user) { issue.author }
let(:regex_match) { described_class.match("issue search find") }
diff --git a/spec/lib/gitlab/slash_commands/issue_show_spec.rb b/spec/lib/gitlab/slash_commands/issue_show_spec.rb
index f67a17c7922..08c380ca8f1 100644
--- a/spec/lib/gitlab/slash_commands/issue_show_spec.rb
+++ b/spec/lib/gitlab/slash_commands/issue_show_spec.rb
@@ -3,7 +3,7 @@ require 'spec_helper'
describe Gitlab::SlashCommands::IssueShow do
describe '#execute' do
let(:issue) { create(:issue, project: project) }
- let(:project) { create(:empty_project) }
+ let(:project) { create(:project) }
let(:user) { issue.author }
let(:regex_match) { described_class.match("issue show #{issue.iid}") }
diff --git a/spec/lib/gitlab/slash_commands/presenters/issue_new_spec.rb b/spec/lib/gitlab/slash_commands/presenters/issue_new_spec.rb
index 7f81ebb47db..76e4bad88fd 100644
--- a/spec/lib/gitlab/slash_commands/presenters/issue_new_spec.rb
+++ b/spec/lib/gitlab/slash_commands/presenters/issue_new_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
describe Gitlab::SlashCommands::Presenters::IssueNew do
- let(:project) { create(:empty_project) }
+ let(:project) { create(:project) }
let(:issue) { create(:issue, project: project) }
let(:attachment) { subject[:attachments].first }
diff --git a/spec/lib/gitlab/slash_commands/presenters/issue_search_spec.rb b/spec/lib/gitlab/slash_commands/presenters/issue_search_spec.rb
index 7e57a0addcb..5a7ec0685fe 100644
--- a/spec/lib/gitlab/slash_commands/presenters/issue_search_spec.rb
+++ b/spec/lib/gitlab/slash_commands/presenters/issue_search_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
describe Gitlab::SlashCommands::Presenters::IssueSearch do
- let(:project) { create(:empty_project) }
+ let(:project) { create(:project) }
let(:message) { subject[:text] }
before do
diff --git a/spec/lib/gitlab/slash_commands/presenters/issue_show_spec.rb b/spec/lib/gitlab/slash_commands/presenters/issue_show_spec.rb
index 2a6ed860737..8f607d7a9c9 100644
--- a/spec/lib/gitlab/slash_commands/presenters/issue_show_spec.rb
+++ b/spec/lib/gitlab/slash_commands/presenters/issue_show_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
describe Gitlab::SlashCommands::Presenters::IssueShow do
- let(:project) { create(:empty_project) }
+ let(:project) { create(:project) }
let(:issue) { create(:issue, project: project) }
let(:attachment) { subject[:attachments].first }
diff --git a/spec/lib/gitlab/template/issue_template_spec.rb b/spec/lib/gitlab/template/issue_template_spec.rb
index bf45c8d16d6..6e0b1075a89 100644
--- a/spec/lib/gitlab/template/issue_template_spec.rb
+++ b/spec/lib/gitlab/template/issue_template_spec.rb
@@ -51,7 +51,7 @@ describe Gitlab::Template::IssueTemplate do
end
context 'when repo is bare or empty' do
- let(:empty_project) { create(:empty_project) }
+ let(:empty_project) { create(:project) }
before do
empty_project.add_user(user, Gitlab::Access::MASTER)
@@ -78,7 +78,7 @@ describe Gitlab::Template::IssueTemplate do
end
context "when repo is empty" do
- let(:empty_project) { create(:empty_project) }
+ let(:empty_project) { create(:project) }
before do
empty_project.add_user(user, Gitlab::Access::MASTER)
diff --git a/spec/lib/gitlab/template/merge_request_template_spec.rb b/spec/lib/gitlab/template/merge_request_template_spec.rb
index 8479f92c8df..b952274cd24 100644
--- a/spec/lib/gitlab/template/merge_request_template_spec.rb
+++ b/spec/lib/gitlab/template/merge_request_template_spec.rb
@@ -51,7 +51,7 @@ describe Gitlab::Template::MergeRequestTemplate do
end
context 'when repo is bare or empty' do
- let(:empty_project) { create(:empty_project) }
+ let(:empty_project) { create(:project) }
before do
empty_project.add_user(user, Gitlab::Access::MASTER)
@@ -78,7 +78,7 @@ describe Gitlab::Template::MergeRequestTemplate do
end
context "when repo is empty" do
- let(:empty_project) { create(:empty_project) }
+ let(:empty_project) { create(:project) }
before do
empty_project.add_user(user, Gitlab::Access::MASTER)
diff --git a/spec/lib/gitlab/uploads_transfer_spec.rb b/spec/lib/gitlab/uploads_transfer_spec.rb
index 109559bb01c..4275e7b015b 100644
--- a/spec/lib/gitlab/uploads_transfer_spec.rb
+++ b/spec/lib/gitlab/uploads_transfer_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper'
describe Gitlab::UploadsTransfer do
it 'leaves avatar uploads where they are' do
- project_with_avatar = create(:empty_project, :with_avatar)
+ project_with_avatar = create(:project, :with_avatar)
described_class.new.rename_namespace('project', 'project-renamed')
diff --git a/spec/lib/gitlab/url_builder_spec.rb b/spec/lib/gitlab/url_builder_spec.rb
index 7412f22640c..b81749cf428 100644
--- a/spec/lib/gitlab/url_builder_spec.rb
+++ b/spec/lib/gitlab/url_builder_spec.rb
@@ -110,7 +110,7 @@ describe Gitlab::UrlBuilder do
context 'on another object' do
it 'returns a proper URL' do
- project = build_stubbed(:empty_project)
+ project = build_stubbed(:project)
expect { described_class.build(project) }
.to raise_error(NotImplementedError, 'No URL builder defined for Project')
diff --git a/spec/lib/gitlab/view/presenter/base_spec.rb b/spec/lib/gitlab/view/presenter/base_spec.rb
index f2c152cdcd4..32a946ca034 100644
--- a/spec/lib/gitlab/view/presenter/base_spec.rb
+++ b/spec/lib/gitlab/view/presenter/base_spec.rb
@@ -26,7 +26,7 @@ describe Gitlab::View::Presenter::Base do
describe '#can?' do
context 'user is not allowed' do
it 'returns false' do
- presenter = presenter_class.new(build_stubbed(:empty_project))
+ presenter = presenter_class.new(build_stubbed(:project))
expect(presenter.can?(nil, :read_project)).to be_falsy
end
@@ -34,7 +34,7 @@ describe Gitlab::View::Presenter::Base do
context 'user is allowed' do
it 'returns true' do
- presenter = presenter_class.new(build_stubbed(:empty_project, :public))
+ presenter = presenter_class.new(build_stubbed(:project, :public))
expect(presenter.can?(nil, :read_project)).to be_truthy
end
@@ -42,9 +42,9 @@ describe Gitlab::View::Presenter::Base do
context 'subject is overriden' do
it 'returns true' do
- presenter = presenter_class.new(build_stubbed(:empty_project, :public))
+ presenter = presenter_class.new(build_stubbed(:project, :public))
- expect(presenter.can?(nil, :read_project, build_stubbed(:empty_project))).to be_falsy
+ expect(presenter.can?(nil, :read_project, build_stubbed(:project))).to be_falsy
end
end
end
diff --git a/spec/lib/repository_cache_spec.rb b/spec/lib/repository_cache_spec.rb
index 0c15ba22bf2..8b0c7254b5e 100644
--- a/spec/lib/repository_cache_spec.rb
+++ b/spec/lib/repository_cache_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
describe RepositoryCache do
- let(:project) { create(:empty_project) }
+ let(:project) { create(:project) }
let(:backend) { double('backend').as_null_object }
let(:cache) { described_class.new('example', project.id, backend) }