2019-10-29 06:06:14 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2013-03-27 17:04:29 +00:00
|
|
|
require "spec_helper"
|
|
|
|
|
2020-06-24 06:09:01 +00:00
|
|
|
RSpec.describe "notifications routing" do
|
2017-04-25 12:28:55 +00:00
|
|
|
it "routes to #show" do
|
2021-01-18 15:10:42 +00:00
|
|
|
expect(get("/-/profile/notifications")).to route_to("profiles/notifications#show")
|
2017-04-25 12:28:55 +00:00
|
|
|
end
|
2013-03-27 17:04:29 +00:00
|
|
|
|
2017-04-25 12:28:55 +00:00
|
|
|
it "routes to #update" do
|
2021-01-18 15:10:42 +00:00
|
|
|
expect(put("/-/profile/notifications")).to route_to("profiles/notifications#update")
|
2013-03-27 17:04:29 +00:00
|
|
|
end
|
2020-08-08 03:10:13 +00:00
|
|
|
|
|
|
|
it 'routes to group #update' do
|
2021-12-16 09:15:29 +00:00
|
|
|
expect(put("/-/profile/groups/gitlab-org/notifications")).to route_to("profiles/groups#update", id: 'gitlab-org')
|
|
|
|
expect(put("/-/profile/groups/gitlab.org/notifications/")).to route_to("profiles/groups#update", id: 'gitlab.org')
|
|
|
|
expect(put("/-/profile/groups/gitlab.org/gitlab/notifications")).to route_to("profiles/groups#update", id: 'gitlab.org/gitlab')
|
2020-08-08 03:10:13 +00:00
|
|
|
end
|
2013-03-27 17:04:29 +00:00
|
|
|
end
|