Commit d2bba30f authored by Rémy Coutable's avatar Rémy Coutable

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
parents 701adc21 0d22b214
......@@ -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
......
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