Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2020-08-08 03:10:13 +00:00
parent 85f6cef972
commit bbd439f9c5
3 changed files with 11 additions and 1 deletions

View file

@ -0,0 +1,5 @@
---
title: Fix notification setting for group with dot in name
merge_request: 38773
author:
type: fixed

View file

@ -22,7 +22,7 @@ resource :profile, only: [:show, :update] do
end end
resource :notifications, only: [:show, :update] do resource :notifications, only: [:show, :update] do
resources :groups, only: :update resources :groups, only: :update, constraints: { id: Gitlab::PathRegex.full_namespace_route_regex }
end end
resource :password, only: [:new, :create, :edit, :update] do resource :password, only: [:new, :create, :edit, :update] do

View file

@ -10,4 +10,9 @@ RSpec.describe "notifications routing" do
it "routes to #update" do it "routes to #update" do
expect(put("/profile/notifications")).to route_to("profiles/notifications#update") expect(put("/profile/notifications")).to route_to("profiles/notifications#update")
end end
it 'routes to group #update' do
expect(put("/profile/notifications/groups/gitlab-org")).to route_to("profiles/groups#update", id: 'gitlab-org')
expect(put("/profile/notifications/groups/gitlab.org")).to route_to("profiles/groups#update", id: 'gitlab.org')
end
end end