summaryrefslogtreecommitdiff
path: root/spec/routing
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2018-02-22 12:44:14 +0100
committerRémy Coutable <remy@rymai.me>2018-02-22 12:44:14 +0100
commitfc7f1aa244731aede4b61e5415b1c9924abba602 (patch)
tree4fa12064de6b1ee3a2a495820c2fd93b8aa15733 /spec/routing
parent1e52d1f6d0155448b819d846983d76ad70d0217f (diff)
downloadgitlab-ce-fc7f1aa244731aede4b61e5415b1c9924abba602.tar.gz
Fix user feature specs that were hardcoding 'user1'43495-spec-failure-spec-features-users_spec-rb
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec/routing')
-rw-r--r--spec/routing/routing_spec.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/routing/routing_spec.rb b/spec/routing/routing_spec.rb
index 91aefa84d0e..56d025f0176 100644
--- a/spec/routing/routing_spec.rb
+++ b/spec/routing/routing_spec.rb
@@ -37,6 +37,22 @@ 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