diff options
author | Robert Speicher <rspeicher@gmail.com> | 2017-08-01 21:51:52 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2017-08-01 21:51:52 +0300 |
commit | 9513bd18c43b749c8856d6ad89635d97c8fb73b5 (patch) | |
tree | b55d7fb920f0d6a8e10eabae1cafa5126fa03203 /spec/controllers/projects_controller_spec.rb | |
parent | 4c77c30fbfb3734fd893f7cfe540fa595ea6539c (diff) |
Ensure all project factories use `:repository` trait or `:empty_project`
Diffstat (limited to 'spec/controllers/projects_controller_spec.rb')
-rw-r--r-- | spec/controllers/projects_controller_spec.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/controllers/projects_controller_spec.rb b/spec/controllers/projects_controller_spec.rb index 192cca45d99..9f19cc30582 100644 --- a/spec/controllers/projects_controller_spec.rb +++ b/spec/controllers/projects_controller_spec.rb @@ -196,7 +196,7 @@ describe ProjectsController do context "redirection from http://someproject.git" do it 'redirects to project page (format.html)' do - project = create(:project, :public) + project = create(:empty_project, :public) get :show, namespace_id: project.namespace, id: project, format: :git @@ -254,7 +254,7 @@ describe ProjectsController do describe '#transfer' do render_views - let(:project) { create(:project) } + let(:project) { create(:project, :repository) } let(:admin) { create(:admin) } let(:new_namespace) { create(:namespace) } @@ -311,8 +311,8 @@ describe ProjectsController do end context "when the project is forked" do - let(:project) { create(:project) } - let(:fork_project) { create(:project, forked_from_project: project) } + let(:project) { create(:project, :repository) } + let(:fork_project) { create(:project, :repository, forked_from_project: project) } let(:merge_request) do create(:merge_request, source_project: fork_project, @@ -390,7 +390,7 @@ describe ProjectsController do end context 'with forked project' do - let(:project_fork) { create(:project, namespace: user.namespace) } + let(:project_fork) { create(:project, :repository, namespace: user.namespace) } before do create(:forked_project_link, forked_to_project: project_fork) @@ -408,7 +408,7 @@ describe ProjectsController do end context 'when project not forked' do - let(:unforked_project) { create(:project, namespace: user.namespace) } + let(:unforked_project) { create(:empty_project, namespace: user.namespace) } it 'does nothing if project was not forked' do delete(:remove_fork, @@ -430,7 +430,7 @@ describe ProjectsController do end describe "GET refs" do - let(:public_project) { create(:project, :public) } + let(:public_project) { create(:project, :public, :repository) } it "gets a list of branches and tags" do get :refs, namespace_id: public_project.namespace, id: public_project |