OSDN Git Service

Refactor API classes. So api classes like Gitlab::Issues become API::Issues
[wvm/gitlab.git] / spec / routing / routing_spec.rb
1 require 'spec_helper'
2
3 # search GET    /search(.:format) search#show
4 describe SearchController, "routing" do
5   it "to #show" do
6     get("/search").should route_to('search#show')
7   end
8 end
9
10 # gitlab_api /api         API::API
11 #     resque /info/resque Resque::Server
12 #            /:path       Grack
13 describe "Mounted Apps", "routing" do
14   it "to API" do
15     get("/api").should be_routable
16   end
17
18   it "to Resque" do
19     pending
20     get("/info/resque").should be_routable
21   end
22
23   it "to Grack" do
24     get("/gitlabhq.git").should be_routable
25   end
26 end
27
28 #              help GET    /help(.:format)              help#index
29 #  help_permissions GET    /help/permissions(.:format)  help#permissions
30 #     help_workflow GET    /help/workflow(.:format)     help#workflow
31 #          help_api GET    /help/api(.:format)          help#api
32 #    help_web_hooks GET    /help/web_hooks(.:format)    help#web_hooks
33 # help_system_hooks GET    /help/system_hooks(.:format) help#system_hooks
34 #     help_markdown GET    /help/markdown(.:format)     help#markdown
35 #          help_ssh GET    /help/ssh(.:format)          help#ssh
36 #    help_raketasks GET    /help/raketasks(.:format)    help#raketasks
37 describe HelpController, "routing" do
38   it "to #index" do
39     get("/help").should route_to('help#index')
40   end
41
42   it "to #permissions" do
43     get("/help/permissions").should route_to('help#permissions')
44   end
45
46   it "to #workflow" do
47     get("/help/workflow").should route_to('help#workflow')
48   end
49
50   it "to #api" do
51     get("/help/api").should route_to('help#api')
52   end
53
54   it "to #web_hooks" do
55     get("/help/web_hooks").should route_to('help#web_hooks')
56   end
57
58   it "to #system_hooks" do
59     get("/help/system_hooks").should route_to('help#system_hooks')
60   end
61
62   it "to #markdown" do
63     get("/help/markdown").should route_to('help#markdown')
64   end
65
66   it "to #ssh" do
67     get("/help/ssh").should route_to('help#ssh')
68   end
69
70   it "to #raketasks" do
71     get("/help/raketasks").should route_to('help#raketasks')
72   end
73 end
74
75 # errors_githost GET    /errors/githost(.:format) errors#githost
76 describe ErrorsController, "routing" do
77   it "to #githost" do
78     get("/errors/githost").should route_to('errors#githost')
79   end
80 end
81
82 #             profile_account GET    /profile/account(.:format)             profile#account
83 #             profile_history GET    /profile/history(.:format)             profile#history
84 #            profile_password PUT    /profile/password(.:format)            profile#password_update
85 #               profile_token GET    /profile/token(.:format)               profile#token
86 # profile_reset_private_token PUT    /profile/reset_private_token(.:format) profile#reset_private_token
87 #                     profile GET    /profile(.:format)                     profile#show
88 #              profile_design GET    /profile/design(.:format)              profile#design
89 #              profile_update PUT    /profile/update(.:format)              profile#update
90 describe ProfilesController, "routing" do
91   it "to #account" do
92     get("/profile/account").should route_to('profiles#account')
93   end
94
95   it "to #history" do
96     get("/profile/history").should route_to('profiles#history')
97   end
98
99   it "to #reset_private_token" do
100     put("/profile/reset_private_token").should route_to('profiles#reset_private_token')
101   end
102
103   it "to #show" do
104     get("/profile").should route_to('profiles#show')
105   end
106
107   it "to #design" do
108     get("/profile/design").should route_to('profiles#design')
109   end
110 end
111
112 #     keys GET    /keys(.:format)          keys#index
113 #          POST   /keys(.:format)          keys#create
114 #  new_key GET    /keys/new(.:format)      keys#new
115 # edit_key GET    /keys/:id/edit(.:format) keys#edit
116 #      key GET    /keys/:id(.:format)      keys#show
117 #          PUT    /keys/:id(.:format)      keys#update
118 #          DELETE /keys/:id(.:format)      keys#destroy
119 describe KeysController, "routing" do
120   it "to #index" do
121     get("/keys").should route_to('keys#index')
122   end
123
124   it "to #create" do
125     post("/keys").should route_to('keys#create')
126   end
127
128   it "to #new" do
129     get("/keys/new").should route_to('keys#new')
130   end
131
132   it "to #edit" do
133     get("/keys/1/edit").should route_to('keys#edit', id: '1')
134   end
135
136   it "to #show" do
137     get("/keys/1").should route_to('keys#show', id: '1')
138   end
139
140   it "to #update" do
141     put("/keys/1").should route_to('keys#update', id: '1')
142   end
143
144   it "to #destroy" do
145     delete("/keys/1").should route_to('keys#destroy', id: '1')
146   end
147 end
148
149 #                dashboard GET    /dashboard(.:format)                dashboard#show
150 #         dashboard_issues GET    /dashboard/issues(.:format)         dashboard#issues
151 # dashboard_merge_requests GET    /dashboard/merge_requests(.:format) dashboard#merge_requests
152 #                     root        /                                   dashboard#show
153 describe DashboardController, "routing" do
154   it "to #index" do
155     get("/dashboard").should route_to('dashboard#show')
156     get("/").should route_to('dashboard#show')
157   end
158
159   it "to #issues" do
160     get("/dashboard/issues").should route_to('dashboard#issues')
161   end
162
163   it "to #merge_requests" do
164     get("/dashboard/merge_requests").should route_to('dashboard#merge_requests')
165   end
166 end
167
168 #        new_user_session GET    /users/sign_in(.:format)               devise/sessions#new
169 #            user_session POST   /users/sign_in(.:format)               devise/sessions#create
170 #    destroy_user_session DELETE /users/sign_out(.:format)              devise/sessions#destroy
171 # user_omniauth_authorize        /users/auth/:provider(.:format)        omniauth_callbacks#passthru
172 #  user_omniauth_callback        /users/auth/:action/callback(.:format) omniauth_callbacks#(?-mix:(?!))
173 #           user_password POST   /users/password(.:format)              devise/passwords#create
174 #       new_user_password GET    /users/password/new(.:format)          devise/passwords#new
175 #      edit_user_password GET    /users/password/edit(.:format)         devise/passwords#edit
176 #                         PUT    /users/password(.:format)              devise/passwords#update
177 describe "Authentication", "routing" do
178   # pending
179 end