diff options
author | Long Nguyen <long.polyglot@gmail.com> | 2016-05-08 22:06:19 +0700 |
---|---|---|
committer | Long Nguyen <long.polyglot@gmail.com> | 2016-05-08 22:06:19 +0700 |
commit | 6781c1b4ba8bb1a7da0a4bf637d7a311abf281f0 (patch) | |
tree | bc4af2d5f16f5f243e6628b9259ae6c9b2111bcf /spec/routing | |
parent | 29089352e388882a799daff7623fc7213f60e1c9 (diff) | |
download | gitlab-ce-6781c1b4ba8bb1a7da0a4bf637d7a311abf281f0.tar.gz |
Add specs for user routing and update spec for user controller
Diffstat (limited to 'spec/routing')
-rw-r--r-- | spec/routing/routing_spec.rb | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/spec/routing/routing_spec.rb b/spec/routing/routing_spec.rb index 543088fa088..8530a2f31d5 100644 --- a/spec/routing/routing_spec.rb +++ b/spec/routing/routing_spec.rb @@ -1,5 +1,42 @@ 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) +describe UsersController, "routing" do + it "to #show" do + expect(get("/u/User")).to route_to('users#show', username: 'User') + end + + it "to #groups" do + expect(get("/u/User/groups")).to route_to('users#groups', username: 'User') + end + + it "to #projects" do + expect(get("/u/User/projects")).to route_to('users#projects', username: 'User') + end + + it "to #contributed" do + expect(get("/u/User/contributed")).to route_to('users#contributed', username: 'User') + end + + it "to #snippets" do + expect(get("/u/User/snippets")).to route_to('users#snippets', username: 'User') + end + + it "to #calendar" do + expect(get("/u/User/calendar")).to route_to('users#calendar', username: 'User') + end + + it "to #calendar_activities" do + expect(get("/u/User/calendar_activities")).to route_to('users#calendar_activities', username: 'User') + end +end + # search GET /search(.:format) search#show describe SearchController, "routing" do it "to #show" do |