Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
531272a5
Commit
531272a5
authored
Nov 30, 2015
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge branch 'stanhu/gitlab-ce-fix-404-after-project-removal'
See merge request !1916
parent
d2f21bf7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
1 deletion
+20
-1
CHANGELOG
CHANGELOG
+3
-0
app/controllers/projects_controller.rb
app/controllers/projects_controller.rb
+1
-1
spec/controllers/projects_controller_spec.rb
spec/controllers/projects_controller_spec.rb
+16
-0
No files found.
CHANGELOG
View file @
531272a5
...
...
@@ -3,6 +3,9 @@ Please view this file on the master branch, on stable branches it's out of date.
v 8.2.2
- Ensure cached application settings are refreshed at startup (Stan Hu)
- Fix Error 500 when viewing user's personal projects from admin page (Stan Hu)
- 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
- Fix: Raw private snippets access workflow
- Prevent "413 Request entity too large" errors when pushing large files with LFS
...
...
app/controllers/projects_controller.rb
View file @
531272a5
...
...
@@ -123,7 +123,7 @@ class ProjectsController < ApplicationController
::
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
...
...
spec/controllers/projects_controller_spec.rb
View file @
531272a5
...
...
@@ -88,6 +88,22 @@ describe ProjectsController do
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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment