2019-10-29 02:06:14 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2013-03-27 13:04:29 -04:00
|
|
|
require "spec_helper"
|
|
|
|
|
2020-06-24 02:09:01 -04:00
|
|
|
RSpec.describe "notifications routing" do
|
2017-04-25 08:28:55 -04:00
|
|
|
it "routes to #show" do
|
2021-01-18 10:10:42 -05:00
|
|
|
expect(get("/-/profile/notifications")).to route_to("profiles/notifications#show")
|
2017-04-25 08:28:55 -04:00
|
|
|
end
|
2013-03-27 13:04:29 -04:00
|
|
|
|
2017-04-25 08:28:55 -04:00
|
|
|
it "routes to #update" do
|
2021-01-18 10:10:42 -05:00
|
|
|
expect(put("/-/profile/notifications")).to route_to("profiles/notifications#update")
|
2013-03-27 13:04:29 -04:00
|
|
|
end
|
2020-08-07 23:10:13 -04:00
|
|
|
|
|
|
|
it 'routes to group #update' do
|
2021-12-16 04:15:29 -05: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-07 23:10:13 -04:00
|
|
|
end
|
2013-03-27 13:04:29 -04:00
|
|
|
end
|