GitLab wurde aktualisiert. Dank regelmäßiger Updates bleibt das THM GitLab sicher und Sie profitieren von den neuesten Funktionen. Vielen Dank für Ihre Geduld.

Commit 2497d3d5 authored by Stan Hu's avatar Stan Hu
Browse files

Fix 404 in redirection after removing a project

Closes https://github.com/gitlabhq/gitlabhq/issues/9844

Closes #3559
parent dee28c50
Please view this file on the master branch, on stable branches it's out of date.
v 8.3.0 (unreleased)
- Fix 404 in redirection after removing a project (Stan Hu)
- Fix: Assignee selector is empty when 'Unassigned' is selected (Jose Corcuera)
- Fix 500 error when update group member permission
......
......@@ -123,7 +123,7 @@ def destroy
::Projects::DestroyService.new(@project, current_user, {}).execute
flash[:alert] = "Project '#{@project.name}' was deleted."
redirect_back_or_default(default: dashboard_projects_path, options: {})
redirect_to dashboard_projects_path
rescue Projects::DestroyService::DestroyError => ex
redirect_to edit_project_path(@project), alert: ex.message
end
......
......@@ -88,6 +88,22 @@
end
end
describe "#destroy" do
let(:admin) { create(:admin) }
it "redirects to the dashboard" do
controller.instance_variable_set(:@project, project)
sign_in(admin)
orig_id = project.id
delete :destroy, namespace_id: project.namespace.path, id: project.path
expect { Project.find(orig_id) }.to raise_error(ActiveRecord::RecordNotFound)
expect(response.status).to eq(302)
expect(response).to redirect_to(dashboard_projects_path)
end
end
describe "POST #toggle_star" do
it "toggles star if user is signed in" do
sign_in(user)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment