diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-08-03 13:13:06 +0200 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-08-03 13:13:06 +0200 |
commit | 2197ee02e95ade455785cc1769bf3a40a082a799 (patch) | |
tree | 387a303a1bce6e5002c78a6d41c904ceffe2b357 /spec/controllers | |
parent | d0ffbd18fa5be4e90d150bc617d0cc7eb3c8720b (diff) | |
parent | 1018ab0516fd94d1ffbc05a0ad8499947dd9630d (diff) | |
download | gitlab-ce-2197ee02e95ade455785cc1769bf3a40a082a799.tar.gz |
Merge branch 'master' into ide
Diffstat (limited to 'spec/controllers')
60 files changed, 109 insertions, 140 deletions
diff --git a/spec/controllers/admin/groups_controller_spec.rb b/spec/controllers/admin/groups_controller_spec.rb index ddf38967dd7..0dad95e418f 100644 --- a/spec/controllers/admin/groups_controller_spec.rb +++ b/spec/controllers/admin/groups_controller_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' describe Admin::GroupsController do let(:group) { create(:group) } - let(:project) { create(:empty_project, namespace: group) } + let(:project) { create(:project, namespace: group) } let(:admin) { create(:admin) } before do diff --git a/spec/controllers/admin/projects_controller_spec.rb b/spec/controllers/admin/projects_controller_spec.rb index 2c35d394b74..65587064eb1 100644 --- a/spec/controllers/admin/projects_controller_spec.rb +++ b/spec/controllers/admin/projects_controller_spec.rb @@ -1,7 +1,7 @@ require 'spec_helper' describe Admin::ProjectsController do - let!(:project) { create(:empty_project, :public) } + let!(:project) { create(:project, :public) } before do sign_in(create(:admin)) diff --git a/spec/controllers/admin/services_controller_spec.rb b/spec/controllers/admin/services_controller_spec.rb index 4ca0cfc74e9..249bd948847 100644 --- a/spec/controllers/admin/services_controller_spec.rb +++ b/spec/controllers/admin/services_controller_spec.rb @@ -8,7 +8,7 @@ describe Admin::ServicesController do end describe 'GET #edit' do - let!(:project) { create(:empty_project) } + let!(:project) { create(:project) } Service.available_services_names.each do |service_name| context "#{service_name}" do @@ -27,7 +27,7 @@ describe Admin::ServicesController do end describe "#update" do - let(:project) { create(:empty_project) } + let(:project) { create(:project) } let!(:service) do RedmineService.create( project: project, diff --git a/spec/controllers/admin/users_controller_spec.rb b/spec/controllers/admin/users_controller_spec.rb index 69928a906c6..29c449d6aa9 100644 --- a/spec/controllers/admin/users_controller_spec.rb +++ b/spec/controllers/admin/users_controller_spec.rb @@ -9,7 +9,7 @@ describe Admin::UsersController do end describe 'DELETE #user with projects' do - let(:project) { create(:empty_project, namespace: user.namespace) } + let(:project) { create(:project, namespace: user.namespace) } let!(:issue) { create(:issue, author: user) } before do diff --git a/spec/controllers/autocomplete_controller_spec.rb b/spec/controllers/autocomplete_controller_spec.rb index 58486f33229..3c396e36b24 100644 --- a/spec/controllers/autocomplete_controller_spec.rb +++ b/spec/controllers/autocomplete_controller_spec.rb @@ -1,7 +1,7 @@ require 'spec_helper' describe AutocompleteController do - let!(:project) { create(:empty_project) } + let!(:project) { create(:project) } let!(:user) { create(:user) } context 'GET users' do diff --git a/spec/controllers/dashboard/labels_controller_spec.rb b/spec/controllers/dashboard/labels_controller_spec.rb index 2b63933008f..a3bfb2f3a87 100644 --- a/spec/controllers/dashboard/labels_controller_spec.rb +++ b/spec/controllers/dashboard/labels_controller_spec.rb @@ -1,7 +1,7 @@ require 'spec_helper' describe Dashboard::LabelsController do - let(:project) { create(:empty_project) } + let(:project) { create(:project) } let(:user) { create(:user) } let!(:label) { create(:label, project: project) } @@ -11,7 +11,7 @@ describe Dashboard::LabelsController do end describe "#index" do - let!(:unrelated_label) { create(:label, project: create(:empty_project, :public)) } + let!(:unrelated_label) { create(:label, project: create(:project, :public)) } it 'returns global labels for projects the user has a relationship with' do get :index, format: :json diff --git a/spec/controllers/dashboard/milestones_controller_spec.rb b/spec/controllers/dashboard/milestones_controller_spec.rb index 424f39fd3b8..2dcb67d50f4 100644 --- a/spec/controllers/dashboard/milestones_controller_spec.rb +++ b/spec/controllers/dashboard/milestones_controller_spec.rb @@ -1,7 +1,7 @@ require 'spec_helper' describe Dashboard::MilestonesController do - let(:project) { create(:empty_project) } + let(:project) { create(:project) } let(:user) { create(:user) } let(:project_milestone) { create(:milestone, project: project) } let(:milestone) do diff --git a/spec/controllers/dashboard/todos_controller_spec.rb b/spec/controllers/dashboard/todos_controller_spec.rb index 4a48621abe1..c8c6b9f41bf 100644 --- a/spec/controllers/dashboard/todos_controller_spec.rb +++ b/spec/controllers/dashboard/todos_controller_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' describe Dashboard::TodosController do let(:user) { create(:user) } let(:author) { create(:user) } - let(:project) { create(:empty_project) } + let(:project) { create(:project) } let(:todo_service) { TodoService.new } before do @@ -14,7 +14,7 @@ describe Dashboard::TodosController do describe 'GET #index' do context 'project authorization' do it 'renders 404 when user does not have read access on given project' do - unauthorized_project = create(:empty_project, :private) + unauthorized_project = create(:project, :private) get :index, project_id: unauthorized_project.id @@ -34,7 +34,7 @@ describe Dashboard::TodosController do end it 'renders 200 when user has access on given project' do - authorized_project = create(:empty_project, :public) + authorized_project = create(:project, :public) get :index, project_id: authorized_project.id diff --git a/spec/controllers/explore/projects_controller_spec.rb b/spec/controllers/explore/projects_controller_spec.rb index 9dceeca168d..2845f258f6f 100644 --- a/spec/controllers/explore/projects_controller_spec.rb +++ b/spec/controllers/explore/projects_controller_spec.rb @@ -3,8 +3,8 @@ require 'spec_helper' describe Explore::ProjectsController do describe 'GET #trending' do context 'sorting by update date' do - let(:project1) { create(:empty_project, :public, updated_at: 3.days.ago) } - let(:project2) { create(:empty_project, :public, updated_at: 1.day.ago) } + let(:project1) { create(:project, :public, updated_at: 3.days.ago) } + let(:project2) { create(:project, :public, updated_at: 1.day.ago) } before do create(:trending_project, project: project1) diff --git a/spec/controllers/groups/milestones_controller_spec.rb b/spec/controllers/groups/milestones_controller_spec.rb index aad67dd0164..fbbc67f3ae0 100644 --- a/spec/controllers/groups/milestones_controller_spec.rb +++ b/spec/controllers/groups/milestones_controller_spec.rb @@ -2,8 +2,8 @@ require 'spec_helper' describe Groups::MilestonesController do let(:group) { create(:group) } - let!(:project) { create(:empty_project, group: group) } - let!(:project2) { create(:empty_project, group: group) } + let!(:project) { create(:project, group: group) } + let!(:project2) { create(:project, group: group) } let(:user) { create(:user) } let(:title) { '肯定不是中文的问题' } let(:milestone) do diff --git a/spec/controllers/groups_controller_spec.rb b/spec/controllers/groups_controller_spec.rb index c4092303a67..c2ada8c8df7 100644 --- a/spec/controllers/groups_controller_spec.rb +++ b/spec/controllers/groups_controller_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' describe GroupsController do let(:user) { create(:user) } let(:group) { create(:group, :public) } - let(:project) { create(:empty_project, namespace: group) } + let(:project) { create(:project, namespace: group) } let!(:group_member) { create(:group_member, group: group, user: user) } describe 'GET #index' do diff --git a/spec/controllers/import/bitbucket_controller_spec.rb b/spec/controllers/import/bitbucket_controller_spec.rb index 8ef10dabd4c..e8707760a5a 100644 --- a/spec/controllers/import/bitbucket_controller_spec.rb +++ b/spec/controllers/import/bitbucket_controller_spec.rb @@ -52,7 +52,7 @@ describe Import::BitbucketController do end it "assigns variables" do - @project = create(:empty_project, import_type: 'bitbucket', creator_id: user.id) + @project = create(:project, import_type: 'bitbucket', creator_id: user.id) allow_any_instance_of(Bitbucket::Client).to receive(:repos).and_return([@repo]) get :status @@ -63,7 +63,7 @@ describe Import::BitbucketController do end it "does not show already added project" do - @project = create(:empty_project, import_type: 'bitbucket', creator_id: user.id, import_source: 'asd/vim') + @project = create(:project, import_type: 'bitbucket', creator_id: user.id, import_source: 'asd/vim') allow_any_instance_of(Bitbucket::Client).to receive(:repos).and_return([@repo]) get :status diff --git a/spec/controllers/import/fogbugz_controller_spec.rb b/spec/controllers/import/fogbugz_controller_spec.rb index fffbc805335..5f0f6dea821 100644 --- a/spec/controllers/import/fogbugz_controller_spec.rb +++ b/spec/controllers/import/fogbugz_controller_spec.rb @@ -16,7 +16,7 @@ describe Import::FogbugzController do end it 'assigns variables' do - @project = create(:empty_project, import_type: 'fogbugz', creator_id: user.id) + @project = create(:project, import_type: 'fogbugz', creator_id: user.id) stub_client(repos: [@repo]) get :status @@ -26,7 +26,7 @@ describe Import::FogbugzController do end it 'does not show already added project' do - @project = create(:empty_project, import_type: 'fogbugz', creator_id: user.id, import_source: 'vim') + @project = create(:project, import_type: 'fogbugz', creator_id: user.id, import_source: 'vim') stub_client(repos: [@repo]) get :status diff --git a/spec/controllers/import/gitlab_controller_spec.rb b/spec/controllers/import/gitlab_controller_spec.rb index 997107dadea..faf1e6f63ea 100644 --- a/spec/controllers/import/gitlab_controller_spec.rb +++ b/spec/controllers/import/gitlab_controller_spec.rb @@ -36,7 +36,7 @@ describe Import::GitlabController do end it "assigns variables" do - @project = create(:empty_project, import_type: 'gitlab', creator_id: user.id) + @project = create(:project, import_type: 'gitlab', creator_id: user.id) stub_client(projects: [@repo]) get :status @@ -46,7 +46,7 @@ describe Import::GitlabController do end it "does not show already added project" do - @project = create(:empty_project, import_type: 'gitlab', creator_id: user.id, import_source: 'asd/vim') + @project = create(:project, import_type: 'gitlab', creator_id: user.id, import_source: 'asd/vim') stub_client(projects: [@repo]) get :status diff --git a/spec/controllers/import/google_code_controller_spec.rb b/spec/controllers/import/google_code_controller_spec.rb index c96fb90f70e..4241db6e771 100644 --- a/spec/controllers/import/google_code_controller_spec.rb +++ b/spec/controllers/import/google_code_controller_spec.rb @@ -27,7 +27,7 @@ describe Import::GoogleCodeController do end it "assigns variables" do - @project = create(:empty_project, import_type: 'google_code', creator_id: user.id) + @project = create(:project, import_type: 'google_code', creator_id: user.id) stub_client(repos: [@repo], incompatible_repos: []) get :status @@ -38,7 +38,7 @@ describe Import::GoogleCodeController do end it "does not show already added project" do - @project = create(:empty_project, import_type: 'google_code', creator_id: user.id, import_source: 'vim') + @project = create(:project, import_type: 'google_code', creator_id: user.id, import_source: 'vim') stub_client(repos: [@repo], incompatible_repos: []) get :status diff --git a/spec/controllers/notification_settings_controller_spec.rb b/spec/controllers/notification_settings_controller_spec.rb index 6b690407ce3..bef815ee1f7 100644 --- a/spec/controllers/notification_settings_controller_spec.rb +++ b/spec/controllers/notification_settings_controller_spec.rb @@ -1,7 +1,7 @@ require 'spec_helper' describe NotificationSettingsController do - let(:project) { create(:empty_project) } + let(:project) { create(:project) } let(:group) { create(:group, :internal) } let(:user) { create(:user) } @@ -99,7 +99,7 @@ describe NotificationSettingsController do end context 'not authorized' do - let(:private_project) { create(:empty_project, :private) } + let(:private_project) { create(:project, :private) } before do sign_in(user) diff --git a/spec/controllers/projects/avatars_controller_spec.rb b/spec/controllers/projects/avatars_controller_spec.rb index 8b71d6518bb..f5ea097af8b 100644 --- a/spec/controllers/projects/avatars_controller_spec.rb +++ b/spec/controllers/projects/avatars_controller_spec.rb @@ -1,7 +1,7 @@ require 'spec_helper' describe Projects::AvatarsController do - let(:project) { create(:empty_project, avatar: fixture_file_upload(Rails.root + "spec/fixtures/dk.png", "image/png")) } + let(:project) { create(:project, avatar: fixture_file_upload(Rails.root + "spec/fixtures/dk.png", "image/png")) } let(:user) { create(:user) } before do diff --git a/spec/controllers/projects/blob_controller_spec.rb b/spec/controllers/projects/blob_controller_spec.rb index a90ad60e6a8..540ba8c8e59 100644 --- a/spec/controllers/projects/blob_controller_spec.rb +++ b/spec/controllers/projects/blob_controller_spec.rb @@ -68,7 +68,7 @@ describe Projects::BlobController do let(:id) { 'markdown/doc' } it 'redirects' do expect(subject) - .to redirect_to("/#{project.path_with_namespace}/tree/markdown/doc") + .to redirect_to("/#{project.full_path}/tree/markdown/doc") end end end @@ -213,7 +213,7 @@ describe Projects::BlobController do context "when user doesn't have access" do before do - other_project = create(:empty_project) + other_project = create(:project, :repository) merge_request.update!(source_project: other_project, target_project: other_project) end diff --git a/spec/controllers/projects/boards/issues_controller_spec.rb b/spec/controllers/projects/boards/issues_controller_spec.rb index dc3b72c6de4..3f6c1092163 100644 --- a/spec/controllers/projects/boards/issues_controller_spec.rb +++ b/spec/controllers/projects/boards/issues_controller_spec.rb @@ -1,7 +1,7 @@ require 'spec_helper' describe Projects::Boards::IssuesController do - let(:project) { create(:empty_project) } + let(:project) { create(:project) } let(:board) { create(:board, project: project) } let(:user) { create(:user) } let(:guest) { create(:user) } diff --git a/spec/controllers/projects/boards/lists_controller_spec.rb b/spec/controllers/projects/boards/lists_controller_spec.rb index 0f2664262e8..65beec16307 100644 --- a/spec/controllers/projects/boards/lists_controller_spec.rb +++ b/spec/controllers/projects/boards/lists_controller_spec.rb @@ -1,7 +1,7 @@ require 'spec_helper' describe Projects::Boards::ListsController do - let(:project) { create(:empty_project) } + let(:project) { create(:project) } let(:board) { create(:board, project: project) } let(:user) { create(:user) } let(:guest) { create(:user) } diff --git a/spec/controllers/projects/boards_controller_spec.rb b/spec/controllers/projects/boards_controller_spec.rb index aed3a45c413..9e2e9a39481 100644 --- a/spec/controllers/projects/boards_controller_spec.rb +++ b/spec/controllers/projects/boards_controller_spec.rb @@ -1,7 +1,7 @@ require 'spec_helper' describe Projects::BoardsController do - let(:project) { create(:empty_project) } + let(:project) { create(:project) } let(:user) { create(:user) } before do diff --git a/spec/controllers/projects/branches_controller_spec.rb b/spec/controllers/projects/branches_controller_spec.rb index 9cd4e9dbf84..745d051a5c1 100644 --- a/spec/controllers/projects/branches_controller_spec.rb +++ b/spec/controllers/projects/branches_controller_spec.rb @@ -33,7 +33,7 @@ describe Projects::BranchesController do let(:ref) { "master" } it 'redirects' do expect(subject) - .to redirect_to("/#{project.path_with_namespace}/tree/merge_branch") + .to redirect_to("/#{project.full_path}/tree/merge_branch") end end @@ -42,7 +42,7 @@ describe Projects::BranchesController do let(:ref) { "master" } it 'redirects' do expect(subject) - .to redirect_to("/#{project.path_with_namespace}/tree/alert('merge');") + .to redirect_to("/#{project.full_path}/tree/alert('merge');") end end @@ -82,7 +82,7 @@ describe Projects::BranchesController do issue_iid: issue.iid expect(subject) - .to redirect_to("/#{project.path_with_namespace}/tree/1-feature-branch") + .to redirect_to("/#{project.full_path}/tree/1-feature-branch") end it 'posts a system note' do @@ -96,7 +96,7 @@ describe Projects::BranchesController do end context 'repository-less project' do - let(:project) { create :empty_project } + let(:project) { create :project } it 'redirects to newly created branch' do result = { status: :success, branch: double(name: branch) } diff --git a/spec/controllers/projects/deploy_keys_controller_spec.rb b/spec/controllers/projects/deploy_keys_controller_spec.rb index efe1a78415b..c3208357694 100644 --- a/spec/controllers/projects/deploy_keys_controller_spec.rb +++ b/spec/controllers/projects/deploy_keys_controller_spec.rb @@ -24,8 +24,8 @@ describe Projects::DeployKeysController do end context 'when json requested' do - let(:project2) { create(:empty_project, :internal)} - let(:project_private) { create(:empty_project, :private)} + let(:project2) { create(:project, :internal)} + let(:project_private) { create(:project, :private)} let(:deploy_key_internal) do create(:deploy_key, key: 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQCdMHEHyhRjbhEZVddFn6lTWdgEy5Q6Bz4nwGB76xWZI5YT/1WJOMEW+sL5zYd31kk7sd3FJ5L9ft8zWMWrr/iWXQikC2cqZK24H1xy+ZUmrRuJD4qGAaIVoyyzBL+avL+lF8J5lg6YSw8gwJY/lX64/vnJHUlWw2n5BF8IFOWhiw== dummy@gitlab.com') diff --git a/spec/controllers/projects/deployments_controller_spec.rb b/spec/controllers/projects/deployments_controller_spec.rb index 0dbfcf97f6f..3daff1eeea3 100644 --- a/spec/controllers/projects/deployments_controller_spec.rb +++ b/spec/controllers/projects/deployments_controller_spec.rb @@ -4,7 +4,7 @@ describe Projects::DeploymentsController do include ApiHelpers let(:user) { create(:user) } - let(:project) { create(:empty_project) } + let(:project) { create(:project) } let(:environment) { create(:environment, name: 'production', project: project) } before do diff --git a/spec/controllers/projects/environments_controller_spec.rb b/spec/controllers/projects/environments_controller_spec.rb index f88f50c3cc6..5a95f4f6199 100644 --- a/spec/controllers/projects/environments_controller_spec.rb +++ b/spec/controllers/projects/environments_controller_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' describe Projects::EnvironmentsController do set(:user) { create(:user) } - set(:project) { create(:empty_project) } + set(:project) { create(:project) } set(:environment) do create(:environment, name: 'production', project: project) diff --git a/spec/controllers/projects/graphs_controller_spec.rb b/spec/controllers/projects/graphs_controller_spec.rb index e0de62e4454..5af03ae118c 100644 --- a/spec/controllers/projects/graphs_controller_spec.rb +++ b/spec/controllers/projects/graphs_controller_spec.rb @@ -24,37 +24,4 @@ describe Projects::GraphsController do expect(response).to redirect_to action: :charts end end - - describe 'GET charts' do - let(:linguist_repository) do - double(languages: { - 'Ruby' => 1000, - 'CoffeeScript' => 350, - 'NSIS' => 15 - }) - end - - let(:expected_values) do - nsis_color = "##{Digest::SHA256.hexdigest('NSIS')[0...6]}" - [ - # colors from Linguist: - { label: "Ruby", color: "#701516", highlight: "#701516" }, - { label: "CoffeeScript", color: "#244776", highlight: "#244776" }, - # colors from SHA256 fallback: - { label: "NSIS", color: nsis_color, highlight: nsis_color } - ] - end - - before do - allow(Linguist::Repository).to receive(:new).and_return(linguist_repository) - end - - it 'sets the correct colour according to language' do - get(:charts, namespace_id: project.namespace, project_id: project, id: 'master') - - expected_values.each do |val| - expect(assigns(:languages)).to include(a_hash_including(val)) - end - end - end end diff --git a/spec/controllers/projects/group_links_controller_spec.rb b/spec/controllers/projects/group_links_controller_spec.rb index 019a50882ab..f8c792cd0f0 100644 --- a/spec/controllers/projects/group_links_controller_spec.rb +++ b/spec/controllers/projects/group_links_controller_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' describe Projects::GroupLinksController do let(:group) { create(:group, :private) } let(:group2) { create(:group, :private) } - let(:project) { create(:empty_project, :private, group: group2) } + let(:project) { create(:project, :private, group: group2) } let(:user) { create(:user) } before do diff --git a/spec/controllers/projects/hooks_controller_spec.rb b/spec/controllers/projects/hooks_controller_spec.rb index b93ab220f4d..07174660f46 100644 --- a/spec/controllers/projects/hooks_controller_spec.rb +++ b/spec/controllers/projects/hooks_controller_spec.rb @@ -1,7 +1,7 @@ require 'spec_helper' describe Projects::HooksController do - let(:project) { create(:empty_project) } + let(:project) { create(:project) } let(:user) { create(:user) } before do diff --git a/spec/controllers/projects/imports_controller_spec.rb b/spec/controllers/projects/imports_controller_spec.rb index 9be61342616..2a5ec6d584b 100644 --- a/spec/controllers/projects/imports_controller_spec.rb +++ b/spec/controllers/projects/imports_controller_spec.rb @@ -5,7 +5,7 @@ describe Projects::ImportsController do describe 'GET #show' do context 'when repository does not exists' do - let(:project) { create(:empty_project) } + let(:project) { create(:project) } before do sign_in(user) diff --git a/spec/controllers/projects/issues_controller_spec.rb b/spec/controllers/projects/issues_controller_spec.rb index 2c57f3bcf8d..bdee3894a13 100644 --- a/spec/controllers/projects/issues_controller_spec.rb +++ b/spec/controllers/projects/issues_controller_spec.rb @@ -234,7 +234,7 @@ describe Projects::IssuesController do end context 'when moving issue to another private project' do - let(:another_project) { create(:empty_project, :private) } + let(:another_project) { create(:project, :private) } context 'when user has access to move issue' do before do @@ -594,7 +594,7 @@ describe Projects::IssuesController do describe 'POST #create' do def post_new_issue(issue_attrs = {}, additional_params = {}) sign_in(user) - project = create(:empty_project, :public) + project = create(:project, :public) project.team << [user, :developer] post :create, { @@ -817,7 +817,7 @@ describe Projects::IssuesController do context "when the user is owner" do let(:owner) { create(:user) } let(:namespace) { create(:namespace, owner: owner) } - let(:project) { create(:empty_project, namespace: namespace) } + let(:project) { create(:project, namespace: namespace) } before do sign_in(owner) diff --git a/spec/controllers/projects/jobs_controller_spec.rb b/spec/controllers/projects/jobs_controller_spec.rb index 5a295ae47a6..fdd7e6f173f 100644 --- a/spec/controllers/projects/jobs_controller_spec.rb +++ b/spec/controllers/projects/jobs_controller_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' describe Projects::JobsController do include ApiHelpers - let(:project) { create(:empty_project, :public) } + let(:project) { create(:project, :public) } let(:pipeline) { create(:ci_pipeline, project: project) } let(:user) { create(:user) } diff --git a/spec/controllers/projects/labels_controller_spec.rb b/spec/controllers/projects/labels_controller_spec.rb index f19ad4c2c81..f4e2dca883d 100644 --- a/spec/controllers/projects/labels_controller_spec.rb +++ b/spec/controllers/projects/labels_controller_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' describe Projects::LabelsController do let(:group) { create(:group) } - let(:project) { create(:empty_project, namespace: group) } + let(:project) { create(:project, namespace: group) } let(:user) { create(:user) } before do @@ -73,7 +73,7 @@ describe Projects::LabelsController do describe 'POST #generate' do context 'personal project' do - let(:personal_project) { create(:empty_project, namespace: user.namespace) } + let(:personal_project) { create(:project, namespace: user.namespace) } it 'creates labels' do post :generate, namespace_id: personal_project.namespace.to_param, project_id: personal_project diff --git a/spec/controllers/projects/mattermosts_controller_spec.rb b/spec/controllers/projects/mattermosts_controller_spec.rb index 12e413db902..4eea7041d29 100644 --- a/spec/controllers/projects/mattermosts_controller_spec.rb +++ b/spec/controllers/projects/mattermosts_controller_spec.rb @@ -1,7 +1,7 @@ require 'spec_helper' describe Projects::MattermostsController do - let!(:project) { create(:empty_project) } + let!(:project) { create(:project) } let!(:user) { create(:user) } before do diff --git a/spec/controllers/projects/merge_requests/conflicts_controller_spec.rb b/spec/controllers/projects/merge_requests/conflicts_controller_spec.rb index 9278ac8edd8..393d38c6e6b 100644 --- a/spec/controllers/projects/merge_requests/conflicts_controller_spec.rb +++ b/spec/controllers/projects/merge_requests/conflicts_controller_spec.rb @@ -1,7 +1,7 @@ require 'spec_helper' describe Projects::MergeRequests::ConflictsController do - let(:project) { create(:project) } + let(:project) { create(:project, :repository) } let(:user) { project.owner } let(:merge_request) { create(:merge_request_with_diffs, target_project: project, source_project: project) } let(:merge_request_with_conflicts) do diff --git a/spec/controllers/projects/merge_requests/creations_controller_spec.rb b/spec/controllers/projects/merge_requests/creations_controller_spec.rb index f9d8f0f5fcf..fc4cec53374 100644 --- a/spec/controllers/projects/merge_requests/creations_controller_spec.rb +++ b/spec/controllers/projects/merge_requests/creations_controller_spec.rb @@ -1,7 +1,7 @@ require 'spec_helper' describe Projects::MergeRequests::CreationsController do - let(:project) { create(:project) } + let(:project) { create(:project, :repository) } let(:user) { project.owner } let(:fork_project) { create(:forked_project_with_submodules) } @@ -83,7 +83,7 @@ describe Projects::MergeRequests::CreationsController do end context 'when the source branch is in a different project to the target' do - let(:other_project) { create(:project) } + let(:other_project) { create(:project, :repository) } before do other_project.team << [user, :master] diff --git a/spec/controllers/projects/merge_requests/diffs_controller_spec.rb b/spec/controllers/projects/merge_requests/diffs_controller_spec.rb index 53fe2bdb189..fad2c8f3ab7 100644 --- a/spec/controllers/projects/merge_requests/diffs_controller_spec.rb +++ b/spec/controllers/projects/merge_requests/diffs_controller_spec.rb @@ -1,7 +1,7 @@ require 'spec_helper' describe Projects::MergeRequests::DiffsController do - let(:project) { create(:project) } + let(:project) { create(:project, :repository) } let(:user) { project.owner } let(:merge_request) { create(:merge_request_with_diffs, target_project: project, source_project: project) } @@ -36,7 +36,7 @@ describe Projects::MergeRequests::DiffsController do context 'with forked projects with submodules' do render_views - let(:project) { create(:project) } + let(:project) { create(:project, :repository) } let(:fork_project) { create(:forked_project_with_submodules) } let(:merge_request) { create(:merge_request_with_diffs, source_project: fork_project, source_branch: 'add-submodule-version-bump', target_branch: 'master', target_project: project) } @@ -145,7 +145,7 @@ describe Projects::MergeRequests::DiffsController do end context 'when the merge request belongs to a different project' do - let(:other_project) { create(:empty_project) } + let(:other_project) { create(:project) } before do other_project.team << [user, :master] diff --git a/spec/controllers/projects/merge_requests_controller_spec.rb b/spec/controllers/projects/merge_requests_controller_spec.rb index 2fce4b7a85f..bb67db268fa 100644 --- a/spec/controllers/projects/merge_requests_controller_spec.rb +++ b/spec/controllers/projects/merge_requests_controller_spec.rb @@ -1,7 +1,7 @@ require 'spec_helper' describe Projects::MergeRequestsController do - let(:project) { create(:project) } + let(:project) { create(:project, :repository) } let(:user) { project.owner } let(:merge_request) { create(:merge_request_with_diffs, target_project: project, source_project: project) } let(:merge_request_with_conflicts) do @@ -106,7 +106,7 @@ describe Projects::MergeRequestsController do end describe 'GET index' do - let!(:merge_request) { create(:merge_request_with_diffs, target_project: project, source_project: project) } + let(:merge_request) { create(:merge_request_with_diffs, target_project: project, source_project: project) } def get_merge_requests(page = nil) get :index, @@ -150,6 +150,8 @@ describe Projects::MergeRequestsController do context 'when filtering by opened state' do context 'with opened merge requests' do it 'lists those merge requests' do + expect(merge_request).to be_persisted + get_merge_requests expect(assigns(:merge_requests)).to include(merge_request) @@ -191,7 +193,7 @@ describe Projects::MergeRequestsController do end context 'there is no source project' do - let(:project) { create(:project) } + let(:project) { create(:project, :repository) } let(:fork_project) { create(:forked_project_with_submodules) } let(:merge_request) { create(:merge_request, source_project: fork_project, source_branch: 'add-submodule-version-bump', target_branch: 'master', target_project: project) } @@ -429,7 +431,7 @@ describe Projects::MergeRequestsController do context "when the user is owner" do let(:owner) { create(:user) } let(:namespace) { create(:namespace, owner: owner) } - let(:project) { create(:project, namespace: namespace) } + let(:project) { create(:project, :repository, namespace: namespace) } before do sign_in owner @@ -587,7 +589,7 @@ describe Projects::MergeRequestsController do describe 'GET ci_environments_status' do context 'the environment is from a forked project' do - let!(:forked) { create(:project) } + let!(:forked) { create(:project, :repository) } let!(:environment) { create(:environment, project: forked) } let!(:deployment) { create(:deployment, environment: environment, sha: forked.commit.id, ref: 'master') } let(:admin) { create(:admin) } @@ -609,7 +611,7 @@ describe Projects::MergeRequestsController do end it 'links to the environment on that project' do - expect(json_response.first['url']).to match /#{forked.path_with_namespace}/ + expect(json_response.first['url']).to match /#{forked.full_path}/ end end end diff --git a/spec/controllers/projects/milestones_controller_spec.rb b/spec/controllers/projects/milestones_controller_spec.rb index bb5a340cd96..62f1fb1f697 100644 --- a/spec/controllers/projects/milestones_controller_spec.rb +++ b/spec/controllers/projects/milestones_controller_spec.rb @@ -1,7 +1,7 @@ require 'spec_helper' describe Projects::MilestonesController do - let(:project) { create(:empty_project) } + let(:project) { create(:project) } let(:user) { create(:user) } let(:milestone) { create(:milestone, project: project) } let(:issue) { create(:issue, project: project, milestone: milestone) } diff --git a/spec/controllers/projects/notes_controller_spec.rb b/spec/controllers/projects/notes_controller_spec.rb index 3b88d5b0d7d..f280c55059c 100644 --- a/spec/controllers/projects/notes_controller_spec.rb +++ b/spec/controllers/projects/notes_controller_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' describe Projects::NotesController do let(:user) { create(:user) } - let(:project) { create(:empty_project) } + let(:project) { create(:project) } let(:issue) { create(:issue, project: project) } let(:note) { create(:note, noteable: issue, project: project) } @@ -167,10 +167,10 @@ describe Projects::NotesController do end context 'when creating a commit comment from an MR fork' do - let(:project) { create(:project) } + let(:project) { create(:project, :repository) } let(:fork_project) do - create(:project).tap do |fork| + create(:project, :repository).tap do |fork| create(:forked_project_link, forked_to_project: fork, forked_from_project: project) end end diff --git a/spec/controllers/projects/pages_controller_spec.rb b/spec/controllers/projects/pages_controller_spec.rb index df35d8e86b9..4d0111302f3 100644 --- a/spec/controllers/projects/pages_controller_spec.rb +++ b/spec/controllers/projects/pages_controller_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' describe Projects::PagesController do let(:user) { create(:user) } - let(:project) { create(:empty_project, :public, :access_requestable) } + let(:project) { create(:project, :public, :access_requestable) } let(:request_params) do { diff --git a/spec/controllers/projects/pages_domains_controller_spec.rb b/spec/controllers/projects/pages_domains_controller_spec.rb index 920189be381..ad4d7da3bdd 100644 --- a/spec/controllers/projects/pages_domains_controller_spec.rb +++ b/spec/controllers/projects/pages_domains_controller_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' describe Projects::PagesDomainsController do let(:user) { create(:user) } - let(:project) { create(:empty_project) } + let(:project) { create(:project) } let!(:pages_domain) { create(:pages_domain, project: project) } let(:request_params) do diff --git a/spec/controllers/projects/pipeline_schedules_controller_spec.rb b/spec/controllers/projects/pipeline_schedules_controller_spec.rb index 41bf5580993..4ac0559c679 100644 --- a/spec/controllers/projects/pipeline_schedules_controller_spec.rb +++ b/spec/controllers/projects/pipeline_schedules_controller_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' describe Projects::PipelineSchedulesController do include AccessMatchersForController - set(:project) { create(:empty_project, :public) } + set(:project) { create(:project, :public) } let!(:pipeline_schedule) { create(:ci_pipeline_schedule, project: project) } describe 'GET #index' do diff --git a/spec/controllers/projects/pipelines_controller_spec.rb b/spec/controllers/projects/pipelines_controller_spec.rb index c8de275ca3e..f9d77c7ad03 100644 --- a/spec/controllers/projects/pipelines_controller_spec.rb +++ b/spec/controllers/projects/pipelines_controller_spec.rb @@ -4,7 +4,7 @@ describe Projects::PipelinesController do include ApiHelpers let(:user) { create(:user) } - let(:project) { create(:empty_project, :public) } + let(:project) { create(:project, :public) } let(:feature) { ProjectFeature::DISABLED } before do @@ -61,7 +61,7 @@ describe Projects::PipelinesController do create_build('post deploy', 3, 'pages 0') end - let(:project) { create(:project) } + let(:project) { create(:project, :repository) } let(:pipeline) do create(:ci_empty_pipeline, project: project, user: user, sha: project.commit.id) end diff --git a/spec/controllers/projects/project_members_controller_spec.rb b/spec/controllers/projects/project_members_controller_spec.rb index 8671d7a78dd..3cb1bec5ea2 100644 --- a/spec/controllers/projects/project_members_controller_spec.rb +++ b/spec/controllers/projects/project_members_controller_spec.rb @@ -2,7 +2,7 @@ require('spec_helper') describe Projects::ProjectMembersController do let(:user) { create(:user) } - let(:project) { create(:empty_project, :public, :access_requestable) } + let(:project) { create(:project, :public, :access_requestable) } describe 'GET index' do it 'should have the project_members address with a 200 status code' do @@ -158,7 +158,7 @@ describe Projects::ProjectMembersController do end context 'and is an owner' do - let(:project) { create(:empty_project, namespace: user.namespace) } + let(:project) { create(:project, namespace: user.namespace) } before do project.team << [user, :master] @@ -261,7 +261,7 @@ describe Projects::ProjectMembersController do end describe 'POST apply_import' do - let(:another_project) { create(:empty_project, :private) } + let(:another_project) { create(:project, :private) } let(:member) { create(:user) } before do diff --git a/spec/controllers/projects/prometheus_controller_spec.rb b/spec/controllers/projects/prometheus_controller_spec.rb index eddf7275975..8407a53272a 100644 --- a/spec/controllers/projects/prometheus_controller_spec.rb +++ b/spec/controllers/projects/prometheus_controller_spec.rb @@ -2,7 +2,7 @@ require('spec_helper') describe Projects::PrometheusController do let(:user) { create(:user) } - let!(:project) { create(:empty_project) } + let!(:project) { create(:project) } let(:prometheus_service) { double('prometheus_service') } diff --git a/spec/controllers/projects/registry/repositories_controller_spec.rb b/spec/controllers/projects/registry/repositories_controller_spec.rb index 464302824a8..2805968dcd9 100644 --- a/spec/controllers/projects/registry/repositories_controller_spec.rb +++ b/spec/controllers/projects/registry/repositories_controller_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' describe Projects::Registry::RepositoriesController do let(:user) { create(:user) } - let(:project) { create(:empty_project, :private) } + let(:project) { create(:project, :private) } before do sign_in(user) diff --git a/spec/controllers/projects/registry/tags_controller_spec.rb b/spec/controllers/projects/registry/tags_controller_spec.rb index a823516830e..f4af3587d23 100644 --- a/spec/controllers/projects/registry/tags_controller_spec.rb +++ b/spec/controllers/projects/registry/tags_controller_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' describe Projects::Registry::TagsController do let(:user) { create(:user) } - let(:project) { create(:empty_project, :private) } + let(:project) { create(:project, :private) } before do sign_in(user) diff --git a/spec/controllers/projects/runners_controller_spec.rb b/spec/controllers/projects/runners_controller_spec.rb index 0fa249e4405..2b6f988fd9c 100644 --- a/spec/controllers/projects/runners_controller_spec.rb +++ b/spec/controllers/projects/runners_controller_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' describe Projects::RunnersController do let(:user) { create(:user) } - let(:project) { create(:empty_project) } + let(:project) { create(:project) } let(:runner) { create(:ci_runner) } let(:params) do diff --git a/spec/controllers/projects/services_controller_spec.rb b/spec/controllers/projects/services_controller_spec.rb index 5a9d8a75f3e..4e9b0c09ff2 100644 --- a/spec/controllers/projects/services_controller_spec.rb +++ b/spec/controllers/projects/services_controller_spec.rb @@ -28,7 +28,7 @@ describe Projects::ServicesController do context 'success' do context 'with empty project' do - let(:project) { create(:empty_project) } + let(:project) { create(:project) } context 'with chat notification service' do let(:service) { project.create_microsoft_teams_service(webhook: 'http://webhook.com') } diff --git a/spec/controllers/projects/settings/ci_cd_controller_spec.rb b/spec/controllers/projects/settings/ci_cd_controller_spec.rb index e9a91cff1b3..a8f4b79b64c 100644 --- a/spec/controllers/projects/settings/ci_cd_controller_spec.rb +++ b/spec/controllers/projects/settings/ci_cd_controller_spec.rb @@ -1,7 +1,7 @@ require('spec_helper') describe Projects::Settings::CiCdController do - let(:project) { create(:empty_project, :public, :access_requestable) } + let(:project) { create(:project, :public, :access_requestable) } let(:user) { create(:user) } before do diff --git a/spec/controllers/projects/settings/integrations_controller_spec.rb b/spec/controllers/projects/settings/integrations_controller_spec.rb index 65f7bb34f4a..e0f9a5b24a6 100644 --- a/spec/controllers/projects/settings/integrations_controller_spec.rb +++ b/spec/controllers/projects/settings/integrations_controller_spec.rb @@ -1,7 +1,7 @@ require 'spec_helper' describe Projects::Settings::IntegrationsController do - let(:project) { create(:empty_project, :public) } + let(:project) { create(:project, :public) } let(:user) { create(:user) } before do diff --git a/spec/controllers/projects/todos_controller_spec.rb b/spec/controllers/projects/todos_controller_spec.rb index c5a4153d991..974330e2bbd 100644 --- a/spec/controllers/projects/todos_controller_spec.rb +++ b/spec/controllers/projects/todos_controller_spec.rb @@ -2,7 +2,7 @@ require('spec_helper') describe Projects::TodosController do let(:user) { create(:user) } - let(:project) { create(:empty_project) } + let(:project) { create(:project) } let(:issue) { create(:issue, project: project) } let(:merge_request) { create(:merge_request, source_project: project) } diff --git a/spec/controllers/projects/tree_controller_spec.rb b/spec/controllers/projects/tree_controller_spec.rb index 16cd2e076e5..775f3998f5d 100644 --- a/spec/controllers/projects/tree_controller_spec.rb +++ b/spec/controllers/projects/tree_controller_spec.rb @@ -81,7 +81,7 @@ describe Projects::TreeController do context 'redirect to blob' do let(:id) { 'master/README.md' } it 'redirects' do - redirect_url = "/#{project.path_with_namespace}/blob/master/README.md" + redirect_url = "/#{project.full_path}/blob/master/README.md" expect(subject) .to redirect_to(redirect_url) end @@ -107,7 +107,7 @@ describe Projects::TreeController do it 'redirects to the new directory' do expect(subject) - .to redirect_to("/#{project.path_with_namespace}/tree/#{branch_name}/#{path}") + .to redirect_to("/#{project.full_path}/tree/#{branch_name}/#{path}") expect(flash[:notice]).to eq('The directory has been successfully created.') end end @@ -118,7 +118,7 @@ describe Projects::TreeController do it 'does not allow overwriting of existing files' do expect(subject) - .to redirect_to("/#{project.path_with_namespace}/tree/master") + .to redirect_to("/#{project.full_path}/tree/master") expect(flash[:alert]).to eq('A file with this name already exists') end end diff --git a/spec/controllers/projects/uploads_controller_spec.rb b/spec/controllers/projects/uploads_controller_spec.rb index cd6961a7bd5..488bcf31371 100644 --- a/spec/controllers/projects/uploads_controller_spec.rb +++ b/spec/controllers/projects/uploads_controller_spec.rb @@ -1,7 +1,7 @@ require('spec_helper') describe Projects::UploadsController do - let(:project) { create(:empty_project) } + let(:project) { create(:project) } let(:user) { create(:user) } let(:jpg) { fixture_file_upload(Rails.root + 'spec/fixtures/rails_sample.jpg', 'image/jpg') } let(:txt) { fixture_file_upload(Rails.root + 'spec/fixtures/doc_sample.txt', 'text/plain') } diff --git a/spec/controllers/projects/variables_controller_spec.rb b/spec/controllers/projects/variables_controller_spec.rb index da06fcb7cfb..6957fb43c19 100644 --- a/spec/controllers/projects/variables_controller_spec.rb +++ b/spec/controllers/projects/variables_controller_spec.rb @@ -1,7 +1,7 @@ require 'spec_helper' describe Projects::VariablesController do - let(:project) { create(:empty_project) } + let(:project) { create(:project) } let(:user) { create(:user) } before do diff --git a/spec/controllers/projects_controller_spec.rb b/spec/controllers/projects_controller_spec.rb index 192cca45d99..34095ef6250 100644 --- a/spec/controllers/projects_controller_spec.rb +++ b/spec/controllers/projects_controller_spec.rb @@ -1,8 +1,8 @@ require('spec_helper') describe ProjectsController do - let(:project) { create(:empty_project) } - let(:public_project) { create(:empty_project, :public) } + let(:project) { create(:project) } + let(:public_project) { create(:project, :public) } let(:user) { create(:user) } let(:jpg) { fixture_file_upload(Rails.root + 'spec/fixtures/rails_sample.jpg', 'image/jpg') } let(:txt) { fixture_file_upload(Rails.root + 'spec/fixtures/doc_sample.txt', 'text/plain') } @@ -34,7 +34,7 @@ describe ProjectsController do end context "user does not have access to project" do - let(:private_project) { create(:empty_project, :private) } + let(:private_project) { create(:project, :private) } it "does not initialize notification setting" do get :show, namespace_id: private_project.namespace, id: private_project @@ -176,7 +176,7 @@ describe ProjectsController do end context "when the url contains .atom" do - let(:public_project_with_dot_atom) { build(:empty_project, :public, name: 'my.atom', path: 'my.atom') } + let(:public_project_with_dot_atom) { build(:project, :public, name: 'my.atom', path: 'my.atom') } it 'expects an error creating the project' do expect(public_project_with_dot_atom).not_to be_valid @@ -185,7 +185,7 @@ describe ProjectsController do context 'when the project is pending deletions' do it 'renders a 404 error' do - project = create(:empty_project, pending_delete: true) + project = create(:project, pending_delete: true) sign_in(user) get :show, namespace_id: project.namespace, id: project @@ -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) @@ -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 diff --git a/spec/controllers/search_controller_spec.rb b/spec/controllers/search_controller_spec.rb index a3708ad0908..37f961d0c94 100644 --- a/spec/controllers/search_controller_spec.rb +++ b/spec/controllers/search_controller_spec.rb @@ -8,7 +8,7 @@ describe SearchController do end it 'finds issue comments' do - project = create(:empty_project, :public) + project = create(:project, :public) note = create(:note_on_issue, project: project) get :show, project_id: project.id, scope: 'notes', search: note.note @@ -23,7 +23,7 @@ describe SearchController do end it "doesn't expose comments on issues" do - project = create(:empty_project, :public, :issues_private) + project = create(:project, :public, :issues_private) note = create(:note_on_issue, project: project) get :show, project_id: project.id, scope: 'notes', search: note.note @@ -33,7 +33,7 @@ describe SearchController do end it "doesn't expose comments on merge_requests" do - project = create(:empty_project, :public, :merge_requests_private) + project = create(:project, :public, :merge_requests_private) note = create(:note_on_merge_request, project: project) get :show, project_id: project.id, scope: 'notes', search: note.note @@ -42,7 +42,7 @@ describe SearchController do end it "doesn't expose comments on snippets" do - project = create(:empty_project, :public, :snippets_private) + project = create(:project, :public, :snippets_private) note = create(:note_on_project_snippet, project: project) get :show, project_id: project.id, scope: 'notes', search: note.note diff --git a/spec/controllers/sent_notifications_controller_spec.rb b/spec/controllers/sent_notifications_controller_spec.rb index 5d2734b8827..31593ce7311 100644 --- a/spec/controllers/sent_notifications_controller_spec.rb +++ b/spec/controllers/sent_notifications_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' describe SentNotificationsController do let(:user) { create(:user) } - let(:project) { create(:empty_project) } + let(:project) { create(:project) } let(:sent_notification) { create(:sent_notification, project: project, noteable: issue, recipient: user) } let(:issue) do diff --git a/spec/controllers/uploads_controller_spec.rb b/spec/controllers/uploads_controller_spec.rb index 96f719e2b82..b3a40f5d15c 100644 --- a/spec/controllers/uploads_controller_spec.rb +++ b/spec/controllers/uploads_controller_spec.rb @@ -131,7 +131,7 @@ describe UploadsController do describe "GET show" do context 'Content-Disposition security measures' do - let(:project) { create(:empty_project, :public) } + let(:project) { create(:project, :public) } context 'for PNG files' do it 'returns Content-Disposition: inline' do @@ -203,7 +203,7 @@ describe UploadsController do end context "when viewing a project avatar" do - let!(:project) { create(:empty_project, avatar: fixture_file_upload(Rails.root + "spec/fixtures/dk.png", "image/png")) } + let!(:project) { create(:project, avatar: fixture_file_upload(Rails.root + "spec/fixtures/dk.png", "image/png")) } context "when the project is public" do before do diff --git a/spec/controllers/users_controller_spec.rb b/spec/controllers/users_controller_spec.rb index 7aeb6efd86d..a64ad73cba8 100644 --- a/spec/controllers/users_controller_spec.rb +++ b/spec/controllers/users_controller_spec.rb @@ -86,7 +86,7 @@ describe UsersController do end context 'forked project' do - let(:project) { create(:empty_project) } + let(:project) { create(:project) } let(:forked_project) { Projects::ForkService.new(project, user).execute } before do @@ -104,7 +104,7 @@ describe UsersController do end describe 'GET #calendar_activities' do - let!(:project) { create(:empty_project) } + let!(:project) { create(:project) } let(:user) { create(:user) } before do |