diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 3e2015b7d5e..e4fd53eed29 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -117,7 +117,7 @@ class ProjectsController < Projects::ApplicationController return access_denied! unless can?(current_user, :remove_project, @project) ::Projects::DestroyService.new(@project, current_user, {}).async_execute - flash[:alert] = "Project '#{@project.name}' will be deleted." + flash[:alert] = "Project '#{@project.name_with_namespace}' will be deleted." redirect_to dashboard_projects_path rescue Projects::DestroyService::DestroyError => ex diff --git a/changelogs/unreleased/29469-message-for-project-x-will-be-deleted-should-include-namespace.yml b/changelogs/unreleased/29469-message-for-project-x-will-be-deleted-should-include-namespace.yml new file mode 100644 index 00000000000..23a32d2c11a --- /dev/null +++ b/changelogs/unreleased/29469-message-for-project-x-will-be-deleted-should-include-namespace.yml @@ -0,0 +1,4 @@ +--- +title: Display full project name with namespace upon deletion +merge_request: +author: diff --git a/spec/features/projects_spec.rb b/spec/features/projects_spec.rb index 3a1240f95b5..ba56030e28d 100644 --- a/spec/features/projects_spec.rb +++ b/spec/features/projects_spec.rb @@ -56,7 +56,7 @@ feature 'Project', feature: true do end describe 'removal', js: true do - let(:user) { create(:user) } + let(:user) { create(:user, username: 'test', name: 'test') } let(:project) { create(:project, namespace: user.namespace, name: 'project1') } before do @@ -67,7 +67,7 @@ feature 'Project', feature: true do it 'removes a project' do expect { remove_with_confirm('Remove project', project.path) }.to change {Project.count}.by(-1) - expect(page).to have_content "Project 'project1' will be deleted." + expect(page).to have_content "Project 'test / project1' will be deleted." expect(Project.all.count).to be_zero expect(project.issues).to be_empty expect(project.merge_requests).to be_empty