diff options
author | Robert Speicher <rspeicher@gmail.com> | 2017-07-21 23:55:17 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2017-07-27 20:12:15 +0300 |
commit | 75319d973b274e071492510688e369e8d3126b43 (patch) | |
tree | eb37221b89a89268c8b6f2ce4b626ddcb90ad485 /spec/features/admin/admin_projects_spec.rb | |
parent | c26f4a07e77786793151bd4ef6063dfcdbb3a808 (diff) |
Use `empty_project` where possible in spec/features/admin
Diffstat (limited to 'spec/features/admin/admin_projects_spec.rb')
-rw-r--r-- | spec/features/admin/admin_projects_spec.rb | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/spec/features/admin/admin_projects_spec.rb b/spec/features/admin/admin_projects_spec.rb index 9856d90bffe..4f69eafcb9d 100644 --- a/spec/features/admin/admin_projects_spec.rb +++ b/spec/features/admin/admin_projects_spec.rb @@ -4,17 +4,18 @@ describe "Admin::Projects" do include Select2Helper let(:user) { create :user } - let!(:project) { create(:project) } - let!(:current_user) { create(:admin) } + let(:project) { create(:empty_project) } + let(:current_user) { create(:admin) } before do sign_in(current_user) end describe "GET /admin/projects" do - let!(:archived_project) { create :project, :public, :archived } + let!(:archived_project) { create :empty_project, :public, :archived } before do + expect(project).to be_persisted visit admin_projects_path end @@ -39,15 +40,14 @@ describe "Admin::Projects" do describe "GET /admin/projects/:namespace_id/:id" do before do - visit admin_projects_path - click_link "#{project.name}" - end + expect(project).to be_persisted - it do - expect(current_path).to eq admin_project_path(project) + visit admin_projects_path + click_link project.name end it "has project info" do + expect(current_path).to eq admin_project_path(project) expect(page).to have_content(project.path) expect(page).to have_content(project.name) expect(page).to have_content(project.name_with_namespace) @@ -56,6 +56,9 @@ describe "Admin::Projects" do end describe 'transfer project' do + # The gitlab-shell transfer will fail for a project without a repository + let(:project) { create(:project, :repository) } + before do create(:group, name: 'Web') |