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:
Rémy Coutable
2018-06-26 07:57:21 +00:00
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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