summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2019-06-25 18:37:47 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2019-06-26 09:18:13 +0300
commit9be95e2b2f72ca481848823d3856b4518fd9743a (patch)
tree86a2c8d6d6086bef124f31fd64a049e2486e9b8d /spec
parentf904971e5fefff92b0cc467a4dc4483ba68b6e6c (diff)
downloadgitlab-ce-9be95e2b2f72ca481848823d3856b4518fd9743a.tar.gz
Remove deprecated /u/:username routesdz-remove-deprecated-user-routes
Also release `u` from TOP_LEVEL_ROUTES Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'spec')
-rw-r--r--spec/routing/routing_spec.rb30
-rw-r--r--spec/support/helpers/jira_service_helper.rb4
2 files changed, 9 insertions, 25 deletions
diff --git a/spec/routing/routing_spec.rb b/spec/routing/routing_spec.rb
index a170bb14144..ff4228c9b99 100644
--- a/spec/routing/routing_spec.rb
+++ b/spec/routing/routing_spec.rb
@@ -1,12 +1,12 @@
require 'spec_helper'
-# user GET /u/:username/
-# user_groups GET /u/:username/groups(.:format)
-# user_projects GET /u/:username/projects(.:format)
-# user_contributed_projects GET /u/:username/contributed(.:format)
-# user_snippets GET /u/:username/snippets(.:format)
-# user_calendar GET /u/:username/calendar(.:format)
-# user_calendar_activities GET /u/:username/calendar_activities(.:format)
+# user GET /users/:username/
+# user_groups GET /users/:username/groups(.:format)
+# user_projects GET /users/:username/projects(.:format)
+# user_contributed_projects GET /users/:username/contributed(.:format)
+# user_snippets GET /users/:username/snippets(.:format)
+# user_calendar GET /users/:username/calendar(.:format)
+# user_calendar_activities GET /users/:username/calendar_activities(.:format)
describe UsersController, "routing" do
it "to #show" do
allow_any_instance_of(::Constraints::UserUrlConstrainer).to receive(:matches?).and_return(true)
@@ -37,22 +37,6 @@ describe UsersController, "routing" do
it "to #calendar_activities" do
expect(get("/users/User/calendar_activities")).to route_to('users#calendar_activities', username: 'User')
end
-
- describe 'redirect alias routes' do
- include RSpec::Rails::RequestExampleGroup
-
- it '/u/user1 redirects to /user1' do
- expect(get("/u/user1")).to redirect_to('/user1')
- end
-
- it '/u/user1/groups redirects to /user1/groups' do
- expect(get("/u/user1/groups")).to redirect_to('/users/user1/groups')
- end
-
- it '/u/user1/projects redirects to /user1/projects' do
- expect(get("/u/user1/projects")).to redirect_to('/users/user1/projects')
- end
- end
end
# search GET /search(.:format) search#show
diff --git a/spec/support/helpers/jira_service_helper.rb b/spec/support/helpers/jira_service_helper.rb
index f4d5343c4ed..477bbf1c2e0 100644
--- a/spec/support/helpers/jira_service_helper.rb
+++ b/spec/support/helpers/jira_service_helper.rb
@@ -25,7 +25,7 @@ module JiraServiceHelper
\"32x32\":\"http://0.0.0.0:4567/secure/useravatar?size=medium&avatarId=10122\",
\"48x48\":\"http://0.0.0.0:4567/secure/useravatar?avatarId=10122\"},
\"displayName\":\"GitLab\",\"active\":true},
- \"body\":\"[Administrator|http://localhost:3000/u/root] mentioned JIRA-1 in Merge request of [gitlab-org/gitlab-test|http://localhost:3000/gitlab-org/gitlab-test/merge_requests/2].\",
+ \"body\":\"[Administrator|http://localhost:3000/root] mentioned JIRA-1 in Merge request of [gitlab-org/gitlab-test|http://localhost:3000/gitlab-org/gitlab-test/merge_requests/2].\",
\"updateAuthor\":{\"self\":\"http://0.0.0.0:4567/rest/api/2/user?username=gitlab\",\"name\":\"gitlab\",\"emailAddress\":\"gitlab@example.com\",
\"avatarUrls\":{\"16x16\":\"http://0.0.0.0:4567/secure/useravatar?size=xsmall&avatarId=10122\",
\"24x24\":\"http://0.0.0.0:4567/secure/useravatar?size=small&avatarId=10122\",
@@ -40,7 +40,7 @@ module JiraServiceHelper
\"24x24\":\"http://0.0.0.0:4567/secure/useravatar?size=small&avatarId=10122\",
\"32x32\":\"http://0.0.0.0:4567/secure/useravatar?size=medium&avatarId=10122\",
\"48x48\":\"http://0.0.0.0:4567/secure/useravatar?avatarId=10122\"},\"displayName\":\"GitLab\",\"active\":true},
- \"body\":\"[Administrator|http://localhost:3000/u/root] mentioned this issue in [a commit of h5bp/html5-boilerplate|http://localhost:3000/h5bp/html5-boilerplate/commit/2439f77897122fbeee3bfd9bb692d3608848433e].\",
+ \"body\":\"[Administrator|http://localhost:3000/root] mentioned this issue in [a commit of h5bp/html5-boilerplate|http://localhost:3000/h5bp/html5-boilerplate/commit/2439f77897122fbeee3bfd9bb692d3608848433e].\",
\"updateAuthor\":{\"self\":\"http://0.0.0.0:4567/rest/api/2/user?username=gitlab\",\"name\":\"gitlab\",\"emailAddress\":\"gitlab@example.com\",
\"avatarUrls\":{\"16x16\":\"http://0.0.0.0:4567/secure/useravatar?size=xsmall&avatarId=10122\",
\"24x24\":\"http://0.0.0.0:4567/secure/useravatar?size=small&avatarId=10122\",