diff options
author | Rémy Coutable <remy@rymai.me> | 2018-02-22 12:44:14 +0100 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2018-02-22 12:44:14 +0100 |
commit | fc7f1aa244731aede4b61e5415b1c9924abba602 (patch) | |
tree | 4fa12064de6b1ee3a2a495820c2fd93b8aa15733 /spec/routing | |
parent | 1e52d1f6d0155448b819d846983d76ad70d0217f (diff) | |
download | gitlab-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.rb | 16 |
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 |