parent
353365c7f2
commit
934f1e9097
|
@ -3,11 +3,12 @@ Please view this file on the master branch, on stable branches it's out of date.
|
||||||
v 8.7.0 (unreleased)
|
v 8.7.0 (unreleased)
|
||||||
- All images in discussions and wikis now link to their source files !3464 (Connor Shea).
|
- All images in discussions and wikis now link to their source files !3464 (Connor Shea).
|
||||||
- Improved Markdown rendering performance !3389 (Yorick Peterse)
|
- Improved Markdown rendering performance !3389 (Yorick Peterse)
|
||||||
- Don't attempt to look up an avatar in repo if repo directory does not exist (Stan hu)
|
- Don't attempt to look up an avatar in repo if repo directory does not exist (Stan Hu)
|
||||||
- Preserve time notes/comments have been updated at when moving issue
|
- Preserve time notes/comments have been updated at when moving issue
|
||||||
- Make HTTP(s) label consistent on clone bar (Stan Hu)
|
- Make HTTP(s) label consistent on clone bar (Stan Hu)
|
||||||
- Expose label description in API (Mariusz Jachimowicz)
|
- Expose label description in API (Mariusz Jachimowicz)
|
||||||
- Allow back dating on issues when created through the API
|
- Allow back dating on issues when created through the API
|
||||||
|
- Fix Error 500 after renaming a project path (Stan Hu)
|
||||||
- Fix avatar stretching by providing a cropping feature
|
- Fix avatar stretching by providing a cropping feature
|
||||||
- Add endpoints to archive or unarchive a project !3372
|
- Add endpoints to archive or unarchive a project !3372
|
||||||
- Add links to CI setup documentation from project settings and builds pages
|
- Add links to CI setup documentation from project settings and builds pages
|
||||||
|
|
|
@ -40,6 +40,9 @@ class ProjectsController < Projects::ApplicationController
|
||||||
def update
|
def update
|
||||||
status = ::Projects::UpdateService.new(@project, current_user, project_params).execute
|
status = ::Projects::UpdateService.new(@project, current_user, project_params).execute
|
||||||
|
|
||||||
|
# Refresh the repo in case anything changed
|
||||||
|
@repository = project.repository
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
if status
|
if status
|
||||||
flash[:notice] = "Project '#{@project.name}' was successfully updated."
|
flash[:notice] = "Project '#{@project.name}' was successfully updated."
|
||||||
|
|
|
@ -83,6 +83,28 @@ describe ProjectsController do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe "#update" do
|
||||||
|
render_views
|
||||||
|
|
||||||
|
let(:admin) { create(:admin) }
|
||||||
|
|
||||||
|
it "sets the repository to the right path after a rename" do
|
||||||
|
new_path = 'renamed_path'
|
||||||
|
project_params = { path: new_path }
|
||||||
|
controller.instance_variable_set(:@project, project)
|
||||||
|
sign_in(admin)
|
||||||
|
|
||||||
|
put :update,
|
||||||
|
namespace_id: project.namespace.to_param,
|
||||||
|
id: project.id,
|
||||||
|
project: project_params
|
||||||
|
|
||||||
|
expect(project.repository.path).to include(new_path)
|
||||||
|
expect(assigns(:repository).path).to eq(project.repository.path)
|
||||||
|
expect(response.status).to eq(200)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
describe "#destroy" do
|
describe "#destroy" do
|
||||||
let(:admin) { create(:admin) }
|
let(:admin) { create(:admin) }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue