summaryrefslogtreecommitdiff
path: root/spec/helpers
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2017-08-02 15:55:11 -0400
committerRobert Speicher <rspeicher@gmail.com>2017-08-02 17:47:31 -0400
commit72a7b30c9f363063449b28aa9efc3a26a1752f9f (patch)
tree173a716da52260e57a73c4a6d739fe055898d556 /spec/helpers
parente2c3dca371f8dca8814a5924fe8ed271f0ec6399 (diff)
downloadgitlab-ce-72a7b30c9f363063449b28aa9efc3a26a1752f9f.tar.gz
Change all `:empty_project` to `:project`rs-empty_project-default
Diffstat (limited to 'spec/helpers')
-rw-r--r--spec/helpers/application_helper_spec.rb4
-rw-r--r--spec/helpers/blob_helper_spec.rb2
-rw-r--r--spec/helpers/button_helper_spec.rb2
-rw-r--r--spec/helpers/ci_status_helper_spec.rb2
-rw-r--r--spec/helpers/commits_helper_spec.rb2
-rw-r--r--spec/helpers/events_helper_spec.rb4
-rw-r--r--spec/helpers/gitlab_routing_helper_spec.rb2
-rw-r--r--spec/helpers/groups_helper_spec.rb4
-rw-r--r--spec/helpers/hooks_helper_spec.rb2
-rw-r--r--spec/helpers/issuables_helper_spec.rb4
-rw-r--r--spec/helpers/issues_helper_spec.rb2
-rw-r--r--spec/helpers/labels_helper_spec.rb4
-rw-r--r--spec/helpers/markup_helper_spec.rb2
-rw-r--r--spec/helpers/members_helper_spec.rb6
-rw-r--r--spec/helpers/merge_requests_helper_spec.rb6
-rw-r--r--spec/helpers/milestones_helper_spec.rb6
-rw-r--r--spec/helpers/notes_helper_spec.rb18
-rw-r--r--spec/helpers/projects_helper_spec.rb10
-rw-r--r--spec/helpers/search_helper_spec.rb2
-rw-r--r--spec/helpers/submodule_helper_spec.rb6
-rw-r--r--spec/helpers/todos_helper_spec.rb2
-rw-r--r--spec/helpers/visibility_level_helper_spec.rb8
22 files changed, 50 insertions, 50 deletions
diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb
index ac5a58ac189..10bc5f2ecd2 100644
--- a/spec/helpers/application_helper_spec.rb
+++ b/spec/helpers/application_helper_spec.rb
@@ -58,7 +58,7 @@ describe ApplicationHelper do
describe 'project_icon' do
it 'returns an url for the avatar' do
- project = create(:empty_project, avatar: File.open(uploaded_image_temp_path))
+ project = create(:project, avatar: File.open(uploaded_image_temp_path))
avatar_url = "/uploads/-/system/project/avatar/#{project.id}/banana_sample.gif"
expect(helper.project_icon(project.full_path).to_s)
@@ -72,7 +72,7 @@ describe ApplicationHelper do
end
it 'gives uploaded icon when present' do
- project = create(:empty_project)
+ project = create(:project)
allow_any_instance_of(Project).to receive(:avatar_in_git).and_return(true)
diff --git a/spec/helpers/blob_helper_spec.rb b/spec/helpers/blob_helper_spec.rb
index bd3a3d24b84..c654151564e 100644
--- a/spec/helpers/blob_helper_spec.rb
+++ b/spec/helpers/blob_helper_spec.rb
@@ -108,7 +108,7 @@ describe BlobHelper do
context 'viewer related' do
include FakeBlobHelpers
- let(:project) { build(:empty_project, lfs_enabled: true) }
+ let(:project) { build(:project, lfs_enabled: true) }
before do
allow(Gitlab.config.lfs).to receive(:enabled).and_return(true)
diff --git a/spec/helpers/button_helper_spec.rb b/spec/helpers/button_helper_spec.rb
index 7c6f3b101d7..250ba239033 100644
--- a/spec/helpers/button_helper_spec.rb
+++ b/spec/helpers/button_helper_spec.rb
@@ -3,7 +3,7 @@ require 'spec_helper'
describe ButtonHelper do
describe 'http_clone_button' do
let(:user) { create(:user) }
- let(:project) { build_stubbed(:empty_project) }
+ let(:project) { build_stubbed(:project) }
let(:has_tooltip_class) { 'has-tooltip' }
def element
diff --git a/spec/helpers/ci_status_helper_spec.rb b/spec/helpers/ci_status_helper_spec.rb
index 3f8df388014..6a3945c0ebc 100644
--- a/spec/helpers/ci_status_helper_spec.rb
+++ b/spec/helpers/ci_status_helper_spec.rb
@@ -48,7 +48,7 @@ describe CiStatusHelper do
describe "#pipeline_status_cache_key" do
it "builds a cache key for pipeline status" do
pipeline_status = Gitlab::Cache::Ci::ProjectPipelineStatus.new(
- build_stubbed(:empty_project),
+ build_stubbed(:project),
pipeline_info: {
sha: "123abc",
status: "success"
diff --git a/spec/helpers/commits_helper_spec.rb b/spec/helpers/commits_helper_spec.rb
index c245bb439db..7179185285c 100644
--- a/spec/helpers/commits_helper_spec.rb
+++ b/spec/helpers/commits_helper_spec.rb
@@ -28,7 +28,7 @@ describe CommitsHelper do
end
describe '#view_on_environment_button' do
- let(:project) { create(:empty_project) }
+ let(:project) { create(:project) }
let(:environment) { create(:environment, external_url: 'http://example.com') }
let(:path) { 'source/file.html' }
let(:sha) { RepoHelpers.sample_commit.id }
diff --git a/spec/helpers/events_helper_spec.rb b/spec/helpers/events_helper_spec.rb
index c3bd0cb3542..aa138f25bd3 100644
--- a/spec/helpers/events_helper_spec.rb
+++ b/spec/helpers/events_helper_spec.rb
@@ -72,13 +72,13 @@ describe EventsHelper do
end
it 'preserves style attribute for a label that can be accessed by current_user' do
- project = create(:empty_project, :public)
+ project = create(:project, :public)
expect(format_event_note(project)).to match(/span class=.*style=.*/)
end
it 'does not style a label that can not be accessed by current_user' do
- project = create(:empty_project, :private)
+ project = create(:project, :private)
expect(format_event_note(project)).to eq("<p>#{input}</p>")
end
diff --git a/spec/helpers/gitlab_routing_helper_spec.rb b/spec/helpers/gitlab_routing_helper_spec.rb
index 9aaed0edf87..537e457513f 100644
--- a/spec/helpers/gitlab_routing_helper_spec.rb
+++ b/spec/helpers/gitlab_routing_helper_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
describe GitlabRoutingHelper do
- let(:project) { build_stubbed(:empty_project) }
+ let(:project) { build_stubbed(:project) }
let(:group) { build_stubbed(:group) }
describe 'Project URL helpers' do
diff --git a/spec/helpers/groups_helper_spec.rb b/spec/helpers/groups_helper_spec.rb
index 3a246f10283..9d6e03e3868 100644
--- a/spec/helpers/groups_helper_spec.rb
+++ b/spec/helpers/groups_helper_spec.rb
@@ -23,7 +23,7 @@ describe GroupsHelper do
describe 'group_lfs_status' do
let(:group) { create(:group) }
- let!(:project) { create(:empty_project, namespace_id: group.id) }
+ let!(:project) { create(:project, namespace_id: group.id) }
before do
allow(Gitlab.config.lfs).to receive(:enabled).and_return(true)
@@ -47,7 +47,7 @@ describe GroupsHelper do
context 'more than one project in group' do
before do
- create(:empty_project, namespace_id: group.id)
+ create(:project, namespace_id: group.id)
end
context 'LFS enabled in group' do
diff --git a/spec/helpers/hooks_helper_spec.rb b/spec/helpers/hooks_helper_spec.rb
index 9f0004bf8cf..2e21f1134b1 100644
--- a/spec/helpers/hooks_helper_spec.rb
+++ b/spec/helpers/hooks_helper_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
describe HooksHelper do
- let(:project) { create(:empty_project) }
+ let(:project) { create(:project) }
let(:project_hook) { create(:project_hook, project: project) }
let(:system_hook) { create(:system_hook) }
let(:trigger) { 'push_events' }
diff --git a/spec/helpers/issuables_helper_spec.rb b/spec/helpers/issuables_helper_spec.rb
index 1aad8a85ab7..7789cfa3554 100644
--- a/spec/helpers/issuables_helper_spec.rb
+++ b/spec/helpers/issuables_helper_spec.rb
@@ -180,7 +180,7 @@ describe IssuablesHelper do
context 'when show_full_reference falsey' do
context 'when @group present' do
it 'display issuable reference to @group' do
- project = build_stubbed(:empty_project)
+ project = build_stubbed(:project)
assign(:show_full_reference, nil)
assign(:group, project.namespace)
@@ -193,7 +193,7 @@ describe IssuablesHelper do
context 'when @project present' do
it 'display issuable reference to @project' do
- project = build_stubbed(:empty_project)
+ project = build_stubbed(:project)
assign(:show_full_reference, nil)
assign(:group, nil)
diff --git a/spec/helpers/issues_helper_spec.rb b/spec/helpers/issues_helper_spec.rb
index 9524a101e74..dc3100311f8 100644
--- a/spec/helpers/issues_helper_spec.rb
+++ b/spec/helpers/issues_helper_spec.rb
@@ -1,7 +1,7 @@
require "spec_helper"
describe IssuesHelper do
- let(:project) { create(:empty_project) }
+ let(:project) { create(:project) }
let(:issue) { create :issue, project: project }
let(:ext_project) { create :redmine_project }
diff --git a/spec/helpers/labels_helper_spec.rb b/spec/helpers/labels_helper_spec.rb
index 8fc94ce09db..36d6e495ed0 100644
--- a/spec/helpers/labels_helper_spec.rb
+++ b/spec/helpers/labels_helper_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper'
describe LabelsHelper do
describe 'link_to_label' do
- let(:project) { create(:empty_project) }
+ let(:project) { create(:project) }
let(:label) { create(:label, project: project) }
context 'without subject' do
@@ -13,7 +13,7 @@ describe LabelsHelper do
context 'with a project as subject' do
let(:namespace) { build(:namespace, name: 'foo3') }
- let(:another_project) { build(:empty_project, namespace: namespace, name: 'bar3') }
+ let(:another_project) { build(:project, namespace: namespace, name: 'bar3') }
it 'links to project issues page' do
expect(link_to_label(label, subject: another_project)).to match %r{<a href="/foo3/bar3/issues\?label_name%5B%5D=#{label.name}">.*</a>}
diff --git a/spec/helpers/markup_helper_spec.rb b/spec/helpers/markup_helper_spec.rb
index 6dfffb7ac63..70eb01c9c44 100644
--- a/spec/helpers/markup_helper_spec.rb
+++ b/spec/helpers/markup_helper_spec.rb
@@ -42,7 +42,7 @@ describe MarkupHelper do
describe "override default project" do
let(:actual) { issue.to_reference }
- let(:second_project) { create(:empty_project, :public) }
+ let(:second_project) { create(:project, :public) }
let(:second_issue) { create(:issue, project: second_project) }
it 'links to the issue' do
diff --git a/spec/helpers/members_helper_spec.rb b/spec/helpers/members_helper_spec.rb
index 2b455571d52..33186cf50d5 100644
--- a/spec/helpers/members_helper_spec.rb
+++ b/spec/helpers/members_helper_spec.rb
@@ -11,7 +11,7 @@ describe MembersHelper do
describe '#remove_member_message' do
let(:requester) { create(:user) }
- let(:project) { create(:empty_project, :public, :access_requestable) }
+ let(:project) { create(:project, :public, :access_requestable) }
let(:project_member) { build(:project_member, project: project) }
let(:project_member_invite) { build(:project_member, project: project).tap { |m| m.generate_invite_token! } }
let(:project_member_request) { project.request_access(requester) }
@@ -32,7 +32,7 @@ describe MembersHelper do
describe '#remove_member_title' do
let(:requester) { create(:user) }
- let(:project) { create(:empty_project, :public, :access_requestable) }
+ let(:project) { create(:project, :public, :access_requestable) }
let(:project_member) { build(:project_member, project: project) }
let(:project_member_request) { project.request_access(requester) }
let(:group) { create(:group, :access_requestable) }
@@ -46,7 +46,7 @@ describe MembersHelper do
end
describe '#leave_confirmation_message' do
- let(:project) { build_stubbed(:empty_project) }
+ let(:project) { build_stubbed(:project) }
let(:group) { build_stubbed(:group) }
let(:user) { build_stubbed(:user) }
diff --git a/spec/helpers/merge_requests_helper_spec.rb b/spec/helpers/merge_requests_helper_spec.rb
index b2a9e277a1c..7d1c17909bf 100644
--- a/spec/helpers/merge_requests_helper_spec.rb
+++ b/spec/helpers/merge_requests_helper_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper'
describe MergeRequestsHelper do
describe 'ci_build_details_path' do
- let(:project) { create(:empty_project) }
+ let(:project) { create(:project) }
let(:merge_request) { MergeRequest.new }
let(:ci_service) { CiService.new }
let(:last_commit) { Ci::Pipeline.new({}) }
@@ -30,8 +30,8 @@ describe MergeRequestsHelper do
end
describe 'within different projects' do
- let(:project) { create(:empty_project) }
- let(:fork_project) { create(:empty_project, forked_from_project: project) }
+ let(:project) { create(:project) }
+ let(:fork_project) { create(:project, forked_from_project: project) }
let(:merge_request) { create(:merge_request, source_project: fork_project, target_project: project) }
subject { format_mr_branch_names(merge_request) }
let(:source_title) { "#{fork_project.full_path}:#{merge_request.source_branch}" }
diff --git a/spec/helpers/milestones_helper_spec.rb b/spec/helpers/milestones_helper_spec.rb
index b8f9c02a486..70b4a89cb86 100644
--- a/spec/helpers/milestones_helper_spec.rb
+++ b/spec/helpers/milestones_helper_spec.rb
@@ -2,8 +2,8 @@ require 'spec_helper'
describe MilestonesHelper do
describe '#milestones_filter_dropdown_path' do
- let(:project) { create(:empty_project) }
- let(:project2) { create(:empty_project) }
+ let(:project) { create(:project) }
+ let(:project2) { create(:project) }
let(:group) { create(:group) }
context 'when @project present' do
@@ -57,7 +57,7 @@ describe MilestonesHelper do
end
describe '#milestone_counts' do
- let(:project) { create(:empty_project) }
+ let(:project) { create(:project) }
let(:counts) { helper.milestone_counts(project.milestones) }
context 'when there are milestones' do
diff --git a/spec/helpers/notes_helper_spec.rb b/spec/helpers/notes_helper_spec.rb
index da1044cef3f..9921ca1af33 100644
--- a/spec/helpers/notes_helper_spec.rb
+++ b/spec/helpers/notes_helper_spec.rb
@@ -5,7 +5,7 @@ describe NotesHelper do
let(:owner) { create(:owner) }
let(:group) { create(:group) }
- let(:project) { create(:empty_project, namespace: group) }
+ let(:project) { create(:project, namespace: group) }
let(:master) { create(:user) }
let(:reporter) { create(:user) }
let(:guest) { create(:user) }
@@ -30,7 +30,7 @@ describe NotesHelper do
end
it 'handles access in different projects' do
- second_project = create(:empty_project)
+ second_project = create(:project)
second_project.team << [master, :reporter]
other_note = create(:note, author: master, project: second_project)
@@ -191,7 +191,7 @@ describe NotesHelper do
it 'return project notes path for project snippet' do
namespace = create(:namespace, path: 'nm')
- @project = create(:empty_project, path: 'test', namespace: namespace)
+ @project = create(:project, path: 'test', namespace: namespace)
@snippet = create(:project_snippet, project: @project)
@noteable = @snippet
@@ -200,7 +200,7 @@ describe NotesHelper do
it 'return project notes path for other noteables' do
namespace = create(:namespace, path: 'nm')
- @project = create(:empty_project, path: 'test', namespace: namespace)
+ @project = create(:project, path: 'test', namespace: namespace)
@noteable = create(:issue, project: @project)
expect(helper.notes_url).to eq("/nm/test/noteable/issue/#{@noteable.id}/notes")
@@ -216,7 +216,7 @@ describe NotesHelper do
it 'return project notes path for project snippet' do
namespace = create(:namespace, path: 'nm')
- @project = create(:empty_project, path: 'test', namespace: namespace)
+ @project = create(:project, path: 'test', namespace: namespace)
note = create(:note_on_project_snippet, project: @project)
expect(helper.note_url(note)).to eq("/nm/test/notes/#{note.id}")
@@ -224,7 +224,7 @@ describe NotesHelper do
it 'return project notes path for other noteables' do
namespace = create(:namespace, path: 'nm')
- @project = create(:empty_project, path: 'test', namespace: namespace)
+ @project = create(:project, path: 'test', namespace: namespace)
note = create(:note_on_issue, project: @project)
expect(helper.note_url(note)).to eq("/nm/test/notes/#{note.id}")
@@ -241,7 +241,7 @@ describe NotesHelper do
it 'returns namespace, project and note for project snippet' do
namespace = create(:namespace, path: 'nm')
- @project = create(:empty_project, path: 'test', namespace: namespace)
+ @project = create(:project, path: 'test', namespace: namespace)
@snippet = create(:project_snippet, project: @project)
@note = create(:note_on_personal_snippet)
@@ -250,7 +250,7 @@ describe NotesHelper do
it 'returns namespace, project and note path for other noteables' do
namespace = create(:namespace, path: 'nm')
- @project = create(:empty_project, path: 'test', namespace: namespace)
+ @project = create(:project, path: 'test', namespace: namespace)
@note = create(:note_on_issue, project: @project)
expect(helper.form_resources).to eq([@project.namespace, @project, @note])
@@ -258,7 +258,7 @@ describe NotesHelper do
end
describe '#noteable_note_url' do
- let(:project) { create(:empty_project) }
+ let(:project) { create(:project) }
let(:issue) { create(:issue, project: project) }
let(:note) { create(:note_on_issue, noteable: issue, project: project) }
diff --git a/spec/helpers/projects_helper_spec.rb b/spec/helpers/projects_helper_spec.rb
index c447c061919..236a7c29634 100644
--- a/spec/helpers/projects_helper_spec.rb
+++ b/spec/helpers/projects_helper_spec.rb
@@ -105,7 +105,7 @@ describe ProjectsHelper do
describe '#load_pipeline_status' do
it 'loads the pipeline status in batch' do
- project = build(:empty_project)
+ project = build(:project)
helper.load_pipeline_status([project])
# Skip lazy loading of the `pipeline_status` attribute
@@ -193,7 +193,7 @@ describe ProjectsHelper do
describe 'link_to_member' do
let(:group) { create(:group) }
- let(:project) { create(:empty_project, group: group) }
+ let(:project) { create(:project, group: group) }
let(:user) { create(:user) }
describe 'using the default options' do
@@ -225,7 +225,7 @@ describe ProjectsHelper do
end
describe '#license_short_name' do
- let(:project) { create(:empty_project) }
+ let(:project) { create(:project) }
context 'when project.repository has a license_key' do
it 'returns the nickname of the license if present' do
@@ -312,7 +312,7 @@ describe ProjectsHelper do
end
describe "#project_feature_access_select" do
- let(:project) { create(:empty_project, :public) }
+ let(:project) { create(:project, :public) }
let(:user) { create(:user) }
context "when project is internal or public" do
@@ -380,7 +380,7 @@ describe ProjectsHelper do
end
describe '#get_project_nav_tabs' do
- let(:project) { create(:empty_project) }
+ let(:project) { create(:project) }
let(:user) { create(:user) }
before do
diff --git a/spec/helpers/search_helper_spec.rb b/spec/helpers/search_helper_spec.rb
index 4dab21440a6..463af15930d 100644
--- a/spec/helpers/search_helper_spec.rb
+++ b/spec/helpers/search_helper_spec.rb
@@ -47,7 +47,7 @@ describe SearchHelper do
end
it "includes the user's projects" do
- project = create(:empty_project, namespace: create(:namespace, owner: user))
+ project = create(:project, namespace: create(:namespace, owner: user))
expect(search_autocomplete_opts(project.name).size).to eq(1)
end
diff --git a/spec/helpers/submodule_helper_spec.rb b/spec/helpers/submodule_helper_spec.rb
index 9e561d0f191..c4f4e0d21dc 100644
--- a/spec/helpers/submodule_helper_spec.rb
+++ b/spec/helpers/submodule_helper_spec.rb
@@ -91,7 +91,7 @@ describe SubmoduleHelper do
context 'in-repository submodule' do
let(:group) { create(:group, name: "Master Project", path: "master-project") }
- let(:project) { create(:empty_project, group: group) }
+ let(:project) { create(:project, group: group) }
before do
self.instance_variable_set(:@project, project)
end
@@ -158,7 +158,7 @@ describe SubmoduleHelper do
context 'submodules with relative links' do
let(:group) { create(:group, name: "Master Project", path: "master-project") }
- let(:project) { create(:empty_project, group: group) }
+ let(:project) { create(:project, group: group) }
let(:commit_id) { sample_commit[:id] }
before do
@@ -192,7 +192,7 @@ describe SubmoduleHelper do
context 'personal project' do
let(:user) { create(:user) }
- let(:project) { create(:empty_project, namespace: user.namespace) }
+ let(:project) { create(:project, namespace: user.namespace) }
it 'one level down with personal project' do
result = relative_self_links('../test.git', commit_id)
diff --git a/spec/helpers/todos_helper_spec.rb b/spec/helpers/todos_helper_spec.rb
index 18a41ca24e3..f55163c26e9 100644
--- a/spec/helpers/todos_helper_spec.rb
+++ b/spec/helpers/todos_helper_spec.rb
@@ -15,7 +15,7 @@ describe TodosHelper do
end
describe '#todo_projects_options' do
- let(:projects) { create_list(:empty_project, 3) }
+ let(:projects) { create_list(:project, 3) }
let(:user) { create(:user) }
it 'returns users authorised projects in json format' do
diff --git a/spec/helpers/visibility_level_helper_spec.rb b/spec/helpers/visibility_level_helper_spec.rb
index ad19cf9263d..c3cccbb0d95 100644
--- a/spec/helpers/visibility_level_helper_spec.rb
+++ b/spec/helpers/visibility_level_helper_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
describe VisibilityLevelHelper do
- let(:project) { build(:empty_project) }
+ let(:project) { build(:project) }
let(:group) { build(:group) }
let(:personal_snippet) { build(:personal_snippet) }
let(:project_snippet) { build(:project_snippet) }
@@ -60,8 +60,8 @@ describe VisibilityLevelHelper do
describe "skip_level?" do
describe "forks" do
- let(:project) { create(:empty_project, :internal) }
- let(:fork_project) { create(:empty_project, forked_from_project: project) }
+ let(:project) { create(:project, :internal) }
+ let(:fork_project) { create(:project, forked_from_project: project) }
it "skips levels" do
expect(skip_level?(fork_project, Gitlab::VisibilityLevel::PUBLIC)).to be_truthy
@@ -71,7 +71,7 @@ describe VisibilityLevelHelper do
end
describe "non-forked project" do
- let(:project) { create(:empty_project, :internal) }
+ let(:project) { create(:project, :internal) }
it "skips levels" do
expect(skip_level?(project, Gitlab::VisibilityLevel::PUBLIC)).to be_falsey