mirror of
https://gitlab.com/gitlab-org/gitlab-foss.git
synced 2025-08-15 21:39:00 +00:00
Merge branch 'update_project_flash_error_message' into 'master'
Set flash error message only for current request when updating project Closes #43772 See merge request gitlab-org/gitlab-ce!20126
This commit is contained in:
@ -63,7 +63,7 @@ class ProjectsController < Projects::ApplicationController
|
||||
redirect_to(edit_project_path(@project))
|
||||
end
|
||||
else
|
||||
flash[:alert] = result[:message]
|
||||
flash.now[:alert] = result[:message]
|
||||
|
||||
format.html { render 'edit' }
|
||||
end
|
||||
|
@ -329,7 +329,7 @@ describe ProjectsController do
|
||||
expect { update_project path: 'renamed_path' }
|
||||
.not_to change { project.reload.path }
|
||||
|
||||
expect(controller).to set_flash[:alert].to(/container registry tags/)
|
||||
expect(controller).to set_flash.now[:alert].to(/container registry tags/)
|
||||
expect(response).to have_gitlab_http_status(200)
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user