diff options
author | Robert Speicher <rspeicher@gmail.com> | 2017-08-02 15:55:11 -0400 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2017-08-02 17:47:31 -0400 |
commit | 72a7b30c9f363063449b28aa9efc3a26a1752f9f (patch) | |
tree | 173a716da52260e57a73c4a6d739fe055898d556 /spec/finders | |
parent | e2c3dca371f8dca8814a5924fe8ed271f0ec6399 (diff) | |
download | gitlab-ce-72a7b30c9f363063449b28aa9efc3a26a1752f9f.tar.gz |
Change all `:empty_project` to `:project`rs-empty_project-default
Diffstat (limited to 'spec/finders')
-rw-r--r-- | spec/finders/access_requests_finder_spec.rb | 2 | ||||
-rw-r--r-- | spec/finders/admin/projects_finder_spec.rb | 14 | ||||
-rw-r--r-- | spec/finders/contributed_projects_finder_spec.rb | 4 | ||||
-rw-r--r-- | spec/finders/events_finder_spec.rb | 4 | ||||
-rw-r--r-- | spec/finders/group_projects_finder_spec.rb | 10 | ||||
-rw-r--r-- | spec/finders/groups_finder_spec.rb | 4 | ||||
-rw-r--r-- | spec/finders/issues_finder_spec.rb | 22 | ||||
-rw-r--r-- | spec/finders/joined_groups_finder_spec.rb | 2 | ||||
-rw-r--r-- | spec/finders/labels_finder_spec.rb | 12 | ||||
-rw-r--r-- | spec/finders/members_finder_spec.rb | 2 | ||||
-rw-r--r-- | spec/finders/merge_requests_finder_spec.rb | 8 | ||||
-rw-r--r-- | spec/finders/milestones_finder_spec.rb | 4 | ||||
-rw-r--r-- | spec/finders/move_to_project_finder_spec.rb | 20 | ||||
-rw-r--r-- | spec/finders/notes_finder_spec.rb | 6 | ||||
-rw-r--r-- | spec/finders/personal_projects_finder_spec.rb | 6 | ||||
-rw-r--r-- | spec/finders/pipeline_schedules_finder_spec.rb | 2 | ||||
-rw-r--r-- | spec/finders/projects_finder_spec.rb | 14 | ||||
-rw-r--r-- | spec/finders/snippets_finder_spec.rb | 4 | ||||
-rw-r--r-- | spec/finders/todos_finder_spec.rb | 2 |
19 files changed, 71 insertions, 71 deletions
diff --git a/spec/finders/access_requests_finder_spec.rb b/spec/finders/access_requests_finder_spec.rb index 1d0c15392b2..0789d3a9b44 100644 --- a/spec/finders/access_requests_finder_spec.rb +++ b/spec/finders/access_requests_finder_spec.rb @@ -5,7 +5,7 @@ describe AccessRequestsFinder do let(:access_requester) { create(:user) } let(:project) do - create(:empty_project, :public, :access_requestable) do |project| + create(:project, :public, :access_requestable) do |project| project.request_access(access_requester) end end diff --git a/spec/finders/admin/projects_finder_spec.rb b/spec/finders/admin/projects_finder_spec.rb index 296d6c51d04..4e367d39cf3 100644 --- a/spec/finders/admin/projects_finder_spec.rb +++ b/spec/finders/admin/projects_finder_spec.rb @@ -6,19 +6,19 @@ describe Admin::ProjectsFinder do let(:group) { create(:group, :public) } let!(:private_project) do - create(:empty_project, :private, name: 'A', path: 'A') + create(:project, :private, name: 'A', path: 'A') end let!(:internal_project) do - create(:empty_project, :internal, group: group, name: 'B', path: 'B') + create(:project, :internal, group: group, name: 'B', path: 'B') end let!(:public_project) do - create(:empty_project, :public, group: group, name: 'C', path: 'C') + create(:project, :public, group: group, name: 'C', path: 'C') end let!(:shared_project) do - create(:empty_project, :private, name: 'D', path: 'D') + create(:project, :private, name: 'D', path: 'D') end let(:params) { {} } @@ -40,7 +40,7 @@ describe Admin::ProjectsFinder do context 'filter by namespace_id' do let(:namespace) { create(:namespace) } - let!(:project_in_namespace) { create(:empty_project, namespace: namespace) } + let!(:project_in_namespace) { create(:project, namespace: namespace) } let(:params) { { namespace_id: namespace.id } } it { is_expected.to eq([project_in_namespace]) } @@ -99,7 +99,7 @@ describe Admin::ProjectsFinder do end context 'filter by archived' do - let!(:archived_project) { create(:empty_project, :public, :archived, name: 'E', path: 'E') } + let!(:archived_project) { create(:project, :public, :archived, name: 'E', path: 'E') } context 'archived=false' do let(:params) { { archived: false } } @@ -115,7 +115,7 @@ describe Admin::ProjectsFinder do end context 'filter by personal' do - let!(:personal_project) { create(:empty_project, namespace: user.namespace) } + let!(:personal_project) { create(:project, namespace: user.namespace) } let(:params) { { personal: true } } it { is_expected.to eq([personal_project]) } diff --git a/spec/finders/contributed_projects_finder_spec.rb b/spec/finders/contributed_projects_finder_spec.rb index 34f665826b6..2d079ea83b4 100644 --- a/spec/finders/contributed_projects_finder_spec.rb +++ b/spec/finders/contributed_projects_finder_spec.rb @@ -6,8 +6,8 @@ describe ContributedProjectsFinder do let(:finder) { described_class.new(source_user) } - let!(:public_project) { create(:empty_project, :public) } - let!(:private_project) { create(:empty_project, :private) } + let!(:public_project) { create(:project, :public) } + let!(:private_project) { create(:project, :private) } before do private_project.add_master(source_user) diff --git a/spec/finders/events_finder_spec.rb b/spec/finders/events_finder_spec.rb index 30a2bd14f10..18d6c0cfd74 100644 --- a/spec/finders/events_finder_spec.rb +++ b/spec/finders/events_finder_spec.rb @@ -3,8 +3,8 @@ require 'spec_helper' describe EventsFinder do let(:user) { create(:user) } let(:other_user) { create(:user) } - let(:project1) { create(:empty_project, :private, creator_id: user.id, namespace: user.namespace) } - let(:project2) { create(:empty_project, :private, creator_id: user.id, namespace: user.namespace) } + let(:project1) { create(:project, :private, creator_id: user.id, namespace: user.namespace) } + let(:project2) { create(:project, :private, creator_id: user.id, namespace: user.namespace) } let(:closed_issue) { create(:closed_issue, project: project1, author: user) } let(:opened_merge_request) { create(:merge_request, source_project: project2, author: user) } let!(:closed_issue_event) { create(:event, project: project1, author: user, target: closed_issue, action: Event::CLOSED, created_at: Date.new(2016, 12, 30)) } diff --git a/spec/finders/group_projects_finder_spec.rb b/spec/finders/group_projects_finder_spec.rb index 3c7c9bdcd08..c6d257bc479 100644 --- a/spec/finders/group_projects_finder_spec.rb +++ b/spec/finders/group_projects_finder_spec.rb @@ -7,11 +7,11 @@ describe GroupProjectsFinder do let(:finder) { described_class.new(group: group, current_user: current_user, options: options) } - let!(:public_project) { create(:empty_project, :public, group: group, path: '1') } - let!(:private_project) { create(:empty_project, :private, group: group, path: '2') } - let!(:shared_project_1) { create(:empty_project, :public, path: '3') } - let!(:shared_project_2) { create(:empty_project, :private, path: '4') } - let!(:shared_project_3) { create(:empty_project, :internal, path: '5') } + let!(:public_project) { create(:project, :public, group: group, path: '1') } + let!(:private_project) { create(:project, :private, group: group, path: '2') } + let!(:shared_project_1) { create(:project, :public, path: '3') } + let!(:shared_project_2) { create(:project, :private, path: '4') } + let!(:shared_project_3) { create(:project, :internal, path: '5') } before do shared_project_1.project_group_links.create(group_access: Gitlab::Access::MASTER, group: group) diff --git a/spec/finders/groups_finder_spec.rb b/spec/finders/groups_finder_spec.rb index 9e70cccc3c4..abc470788e1 100644 --- a/spec/finders/groups_finder_spec.rb +++ b/spec/finders/groups_finder_spec.rb @@ -80,7 +80,7 @@ describe GroupsFinder do context 'authorized to private project' do context 'project one level deep' do - let!(:subproject) { create(:empty_project, :private, namespace: private_subgroup) } + let!(:subproject) { create(:project, :private, namespace: private_subgroup) } before do subproject.add_guest(user) end @@ -98,7 +98,7 @@ describe GroupsFinder do context 'project two levels deep' do let!(:private_subsubgroup) { create(:group, :private, parent: private_subgroup) } - let!(:subsubproject) { create(:empty_project, :private, namespace: private_subsubgroup) } + let!(:subsubproject) { create(:project, :private, namespace: private_subsubgroup) } before do subsubproject.add_guest(user) end diff --git a/spec/finders/issues_finder_spec.rb b/spec/finders/issues_finder_spec.rb index bef4fd44331..8769a52863c 100644 --- a/spec/finders/issues_finder_spec.rb +++ b/spec/finders/issues_finder_spec.rb @@ -3,8 +3,8 @@ require 'spec_helper' describe IssuesFinder do set(:user) { create(:user) } set(:user2) { create(:user) } - set(:project1) { create(:empty_project) } - set(:project2) { create(:empty_project) } + set(:project1) { create(:project) } + set(:project2) { create(:project) } set(:milestone) { create(:milestone, project: project1) } set(:label) { create(:label, project: project2) } set(:issue1) { create(:issue, author: user, assignees: [user], project: project1, milestone: milestone, title: 'gitlab', created_at: 1.week.ago) } @@ -87,9 +87,9 @@ describe IssuesFinder do context 'filtering by upcoming milestone' do let(:params) { { milestone_title: Milestone::Upcoming.name } } - let(:project_no_upcoming_milestones) { create(:empty_project, :public) } - let(:project_next_1_1) { create(:empty_project, :public) } - let(:project_next_8_8) { create(:empty_project, :public) } + let(:project_no_upcoming_milestones) { create(:project, :public) } + let(:project_next_1_1) { create(:project, :public) } + let(:project_next_8_8) { create(:project, :public) } let(:yesterday) { Date.today - 1.day } let(:tomorrow) { Date.today + 1.day } @@ -121,9 +121,9 @@ describe IssuesFinder do context 'filtering by started milestone' do let(:params) { { milestone_title: Milestone::Started.name } } - let(:project_no_started_milestones) { create(:empty_project, :public) } - let(:project_started_1_and_2) { create(:empty_project, :public) } - let(:project_started_8) { create(:empty_project, :public) } + let(:project_no_started_milestones) { create(:project, :public) } + let(:project_started_1_and_2) { create(:project, :public) } + let(:project_started_8) { create(:project, :public) } let(:yesterday) { Date.today - 1.day } let(:tomorrow) { Date.today + 1.day } @@ -268,7 +268,7 @@ describe IssuesFinder do it 'finds issues user can access due to group' do group = create(:group) - project = create(:empty_project, group: group) + project = create(:project, group: group) issue = create(:issue, project: project) group.add_user(user, :owner) @@ -296,7 +296,7 @@ describe IssuesFinder do let(:scope) { nil } it "doesn't return team-only issues to non team members" do - project = create(:empty_project, :public, :issues_private) + project = create(:project, :public, :issues_private) issue = create(:issue, project: project) expect(issues).not_to include(issue) @@ -315,7 +315,7 @@ describe IssuesFinder do describe '#with_confidentiality_access_check' do let(:guest) { create(:user) } set(:authorized_user) { create(:user) } - set(:project) { create(:empty_project, namespace: authorized_user.namespace) } + set(:project) { create(:project, namespace: authorized_user.namespace) } set(:public_issue) { create(:issue, project: project) } set(:confidential_issue) { create(:issue, project: project, confidential: true) } diff --git a/spec/finders/joined_groups_finder_spec.rb b/spec/finders/joined_groups_finder_spec.rb index 4c389746252..29a47e005a6 100644 --- a/spec/finders/joined_groups_finder_spec.rb +++ b/spec/finders/joined_groups_finder_spec.rb @@ -42,7 +42,7 @@ describe JoinedGroupsFinder do context 'if profile visitor is in one of the private group projects' do before do - project = create(:empty_project, :private, group: private_group, name: 'B', path: 'B') + project = create(:project, :private, group: private_group, name: 'B', path: 'B') project.add_user(profile_visitor, Gitlab::Access::DEVELOPER) end diff --git a/spec/finders/labels_finder_spec.rb b/spec/finders/labels_finder_spec.rb index 95d96354b77..afa2a40ed2a 100644 --- a/spec/finders/labels_finder_spec.rb +++ b/spec/finders/labels_finder_spec.rb @@ -6,11 +6,11 @@ describe LabelsFinder do let(:group_2) { create(:group) } let(:group_3) { create(:group) } - let(:project_1) { create(:empty_project, namespace: group_1) } - let(:project_2) { create(:empty_project, namespace: group_2) } - let(:project_3) { create(:empty_project) } - let(:project_4) { create(:empty_project, :public) } - let(:project_5) { create(:empty_project, namespace: group_1) } + let(:project_1) { create(:project, namespace: group_1) } + let(:project_2) { create(:project, namespace: group_2) } + let(:project_3) { create(:project) } + let(:project_4) { create(:project, :public) } + let(:project_5) { create(:project, namespace: group_1) } let!(:project_label_1) { create(:label, project: project_1, title: 'Label 1') } let!(:project_label_2) { create(:label, project: project_2, title: 'Label 2') } @@ -68,7 +68,7 @@ describe LabelsFinder do context 'as an administrator' do it 'does not return labels from another project' do # Purposefully creating a project with _nothing_ associated to it - isolated_project = create(:empty_project) + isolated_project = create(:project) admin = create(:admin) # project_3 has a label associated to it, which we don't want coming diff --git a/spec/finders/members_finder_spec.rb b/spec/finders/members_finder_spec.rb index 9fb9ffa95e7..300ba8422e8 100644 --- a/spec/finders/members_finder_spec.rb +++ b/spec/finders/members_finder_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' describe MembersFinder, '#execute' do let(:group) { create(:group) } let(:nested_group) { create(:group, :access_requestable, parent: group) } - let(:project) { create(:empty_project, namespace: nested_group) } + let(:project) { create(:project, namespace: nested_group) } let(:user1) { create(:user) } let(:user2) { create(:user) } let(:user3) { create(:user) } diff --git a/spec/finders/merge_requests_finder_spec.rb b/spec/finders/merge_requests_finder_spec.rb index b46218bf72e..b54155a6704 100644 --- a/spec/finders/merge_requests_finder_spec.rb +++ b/spec/finders/merge_requests_finder_spec.rb @@ -4,9 +4,9 @@ describe MergeRequestsFinder do let(:user) { create :user } let(:user2) { create :user } - let(:project1) { create(:empty_project) } - let(:project2) { create(:empty_project, forked_from_project: project1) } - let(:project3) { create(:empty_project, :archived, forked_from_project: project1) } + let(:project1) { create(:project) } + let(:project2) { create(:project, forked_from_project: project1) } + let(:project3) { create(:project, :archived, forked_from_project: project1) } let!(:merge_request1) { create(:merge_request, :simple, author: user, source_project: project2, target_project: project1) } let!(:merge_request2) { create(:merge_request, :simple, author: user, source_project: project2, target_project: project1, state: 'closed') } @@ -67,7 +67,7 @@ describe MergeRequestsFinder do end context 'with created_after and created_before params' do - let(:project4) { create(:empty_project, forked_from_project: project1) } + let(:project4) { create(:project, forked_from_project: project1) } let!(:new_merge_request) do create(:merge_request, diff --git a/spec/finders/milestones_finder_spec.rb b/spec/finders/milestones_finder_spec.rb index 32ec983c5b8..8ae08656e01 100644 --- a/spec/finders/milestones_finder_spec.rb +++ b/spec/finders/milestones_finder_spec.rb @@ -2,8 +2,8 @@ require 'spec_helper' describe MilestonesFinder do let(:group) { create(:group) } - let(:project_1) { create(:empty_project, namespace: group) } - let(:project_2) { create(:empty_project, namespace: group) } + let(:project_1) { create(:project, namespace: group) } + let(:project_2) { create(:project, namespace: group) } let!(:milestone_1) { create(:milestone, group: group, title: 'one test', due_date: Date.today) } let!(:milestone_2) { create(:milestone, group: group) } let!(:milestone_3) { create(:milestone, project: project_1, state: 'active', due_date: Date.tomorrow) } diff --git a/spec/finders/move_to_project_finder_spec.rb b/spec/finders/move_to_project_finder_spec.rb index dea87980e25..e577083a2d0 100644 --- a/spec/finders/move_to_project_finder_spec.rb +++ b/spec/finders/move_to_project_finder_spec.rb @@ -2,13 +2,13 @@ require 'spec_helper' describe MoveToProjectFinder do let(:user) { create(:user) } - let(:project) { create(:empty_project) } + let(:project) { create(:project) } - let(:no_access_project) { create(:empty_project) } - let(:guest_project) { create(:empty_project) } - let(:reporter_project) { create(:empty_project) } - let(:developer_project) { create(:empty_project) } - let(:master_project) { create(:empty_project) } + let(:no_access_project) { create(:project) } + let(:guest_project) { create(:project) } + let(:reporter_project) { create(:project) } + let(:developer_project) { create(:project) } + let(:master_project) { create(:project) } subject { described_class.new(user) } @@ -37,7 +37,7 @@ describe MoveToProjectFinder do it 'does not return archived projects' do reporter_project.team << [user, :reporter] reporter_project.archive! - other_reporter_project = create(:empty_project) + other_reporter_project = create(:project) other_reporter_project.team << [user, :reporter] expect(subject.execute(project).to_a).to eq([other_reporter_project]) @@ -46,7 +46,7 @@ describe MoveToProjectFinder do it 'does not return projects for which issues are disabled' do reporter_project.team << [user, :reporter] reporter_project.update_attributes(issues_enabled: false) - other_reporter_project = create(:empty_project) + other_reporter_project = create(:project) other_reporter_project.team << [user, :reporter] expect(subject.execute(project).to_a).to eq([other_reporter_project]) @@ -83,10 +83,10 @@ describe MoveToProjectFinder do end it 'returns projects matching a search query' do - foo_project = create(:empty_project) + foo_project = create(:project) foo_project.team << [user, :master] - wadus_project = create(:empty_project, name: 'wadus') + wadus_project = create(:project, name: 'wadus') wadus_project.team << [user, :master] expect(subject.execute(project).to_a).to eq([wadus_project, foo_project]) diff --git a/spec/finders/notes_finder_spec.rb b/spec/finders/notes_finder_spec.rb index ba6bbb3bce0..900fa2b12d1 100644 --- a/spec/finders/notes_finder_spec.rb +++ b/spec/finders/notes_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' describe NotesFinder do let(:user) { create :user } - let(:project) { create(:empty_project) } + let(:project) { create(:project) } before do project.team << [user, :master] @@ -43,7 +43,7 @@ describe NotesFinder do context 'on restricted projects' do let(:project) do - create(:empty_project, + create(:project, :public, :issues_private, :snippets_private, @@ -156,7 +156,7 @@ describe NotesFinder do end describe '.search' do - let(:project) { create(:empty_project, :public) } + let(:project) { create(:project, :public) } let(:note) { create(:note_on_issue, note: 'WoW', project: project) } it 'returns notes with matching content' do diff --git a/spec/finders/personal_projects_finder_spec.rb b/spec/finders/personal_projects_finder_spec.rb index 304b0fb67fb..d0113ba87df 100644 --- a/spec/finders/personal_projects_finder_spec.rb +++ b/spec/finders/personal_projects_finder_spec.rb @@ -4,14 +4,14 @@ describe PersonalProjectsFinder do let(:source_user) { create(:user) } let(:current_user) { create(:user) } let(:finder) { described_class.new(source_user) } - let!(:public_project) { create(:empty_project, :public, namespace: source_user.namespace) } + let!(:public_project) { create(:project, :public, namespace: source_user.namespace) } let!(:private_project) do - create(:empty_project, :private, namespace: source_user.namespace, path: 'mepmep') + create(:project, :private, namespace: source_user.namespace, path: 'mepmep') end let!(:internal_project) do - create(:empty_project, :internal, namespace: source_user.namespace, path: 'C') + create(:project, :internal, namespace: source_user.namespace, path: 'C') end before do diff --git a/spec/finders/pipeline_schedules_finder_spec.rb b/spec/finders/pipeline_schedules_finder_spec.rb index e184a87c9c7..b9538649b3f 100644 --- a/spec/finders/pipeline_schedules_finder_spec.rb +++ b/spec/finders/pipeline_schedules_finder_spec.rb @@ -1,7 +1,7 @@ require 'spec_helper' describe PipelineSchedulesFinder do - let(:project) { create(:empty_project) } + let(:project) { create(:project) } let!(:active_schedule) { create(:ci_pipeline_schedule, project: project) } let!(:inactive_schedule) { create(:ci_pipeline_schedule, :inactive, project: project) } diff --git a/spec/finders/projects_finder_spec.rb b/spec/finders/projects_finder_spec.rb index 03d98459e8c..a5de586e869 100644 --- a/spec/finders/projects_finder_spec.rb +++ b/spec/finders/projects_finder_spec.rb @@ -6,19 +6,19 @@ describe ProjectsFinder do let(:group) { create(:group, :public) } let!(:private_project) do - create(:empty_project, :private, name: 'A', path: 'A') + create(:project, :private, name: 'A', path: 'A') end let!(:internal_project) do - create(:empty_project, :internal, group: group, name: 'B', path: 'B') + create(:project, :internal, group: group, name: 'B', path: 'B') end let!(:public_project) do - create(:empty_project, :public, group: group, name: 'C', path: 'C') + create(:project, :public, group: group, name: 'C', path: 'C') end let!(:shared_project) do - create(:empty_project, :private, name: 'D', path: 'D') + create(:project, :private, name: 'D', path: 'D') end let(:params) { {} } @@ -90,7 +90,7 @@ describe ProjectsFinder do end describe 'filter by personal' do - let!(:personal_project) { create(:empty_project, namespace: user.namespace) } + let!(:personal_project) { create(:project, namespace: user.namespace) } let(:params) { { personal: true } } it { is_expected.to eq([personal_project]) } @@ -109,7 +109,7 @@ describe ProjectsFinder do end describe 'filter by archived' do - let!(:archived_project) { create(:empty_project, :public, :archived, name: 'E', path: 'E') } + let!(:archived_project) { create(:project, :public, :archived, name: 'E', path: 'E') } context 'non_archived=true' do let(:params) { { non_archived: true } } @@ -139,7 +139,7 @@ describe ProjectsFinder do describe 'filter by owned' do let(:params) { { owned: true } } - let!(:owned_project) { create(:empty_project, :private, namespace: current_user.namespace) } + let!(:owned_project) { create(:project, :private, namespace: current_user.namespace) } it { is_expected.to eq([owned_project]) } end diff --git a/spec/finders/snippets_finder_spec.rb b/spec/finders/snippets_finder_spec.rb index 35f1683eef9..7ae7b7d2140 100644 --- a/spec/finders/snippets_finder_spec.rb +++ b/spec/finders/snippets_finder_spec.rb @@ -5,8 +5,8 @@ describe SnippetsFinder do let(:user1) { create :user } let(:group) { create :group, :public } - let(:project1) { create(:empty_project, :public, group: group) } - let(:project2) { create(:empty_project, :private, group: group) } + let(:project1) { create(:project, :public, group: group) } + let(:project2) { create(:project, :private, group: group) } context 'all snippets visible to a user' do let!(:snippet1) { create(:personal_snippet, :private) } diff --git a/spec/finders/todos_finder_spec.rb b/spec/finders/todos_finder_spec.rb index 8be447418b0..884ce22091e 100644 --- a/spec/finders/todos_finder_spec.rb +++ b/spec/finders/todos_finder_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' describe TodosFinder do describe '#execute' do let(:user) { create(:user) } - let(:project) { create(:empty_project) } + let(:project) { create(:project) } let(:finder) { described_class } before do |