Commit 50de2678 authored by Stan Hu's avatar Stan Hu

Merge branch 'fix_notification_setting_group_dot' into 'master'

Fix for notification setting for group with dot char in name

See merge request gitlab-org/gitlab!38773
parents cb8cab46 6f03fa5b
---
title: Fix notification setting for group with dot in name
merge_request: 38773
author:
type: fixed
......@@ -22,7 +22,7 @@ resource :profile, only: [:show, :update] do
end
resource :notifications, only: [:show, :update] do
resources :groups, only: :update
resources :groups, only: :update, constraints: { id: Gitlab::PathRegex.full_namespace_route_regex }
end
resource :password, only: [:new, :create, :edit, :update] do
......
......@@ -10,4 +10,9 @@ RSpec.describe "notifications routing" do
it "routes to #update" do
expect(put("/profile/notifications")).to route_to("profiles/notifications#update")
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
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