Commit bde5088525512643434ab88b491c0ba9ad6e248b
1 parent
5e1ef575
Exists in
master
and in
4 other branches
Add routing specs for new routes
Showing
1 changed file
with
59 additions
and
0 deletions
Show diff stats
spec/routing/project_routing_spec.rb
| @@ -396,3 +396,62 @@ describe NotesController, "routing" do | @@ -396,3 +396,62 @@ describe NotesController, "routing" do | ||
| 396 | let(:controller) { 'notes' } | 396 | let(:controller) { 'notes' } |
| 397 | end | 397 | end |
| 398 | end | 398 | end |
| 399 | + | ||
| 400 | +# TODO: Pending | ||
| 401 | +# | ||
| 402 | +# /:project_id/blame/*path | ||
| 403 | +# /gitlabhq/blame/master/app/contexts/base_context.rb | ||
| 404 | +# /gitlabhq/blame/test/branch/name/app/contexts/base_context.rb | ||
| 405 | +# | ||
| 406 | +# /:project_id/blob/*path | ||
| 407 | +# /gitlabhq/blob/master/app/contexts/base_context.rb | ||
| 408 | +# /gitlabhq/blob/test/branch/name/app/contexts/base_context.rb | ||
| 409 | +# | ||
| 410 | +# /:project_id/commit/:id | ||
| 411 | +# /gitlabhq/commit/caef9ed1121a16ca0cc78715695daaa974271bfd | ||
| 412 | +# | ||
| 413 | +# /:project_id/commits | ||
| 414 | +# | ||
| 415 | +# /:project_id/commits/*path | ||
| 416 | +# /gitlabhq/commits/master/app/contexts/base_context.rb | ||
| 417 | +# /gitlabhq/commits/test/branch/name/app/contexts/base_context.rb | ||
| 418 | +# | ||
| 419 | +# /:project_id/raw/*path | ||
| 420 | +# /gitlabhq/raw/master/app/contexts/base_context.rb | ||
| 421 | +# /gitlabhq/raw/test/branch/name/app/contexts/base_context.rb | ||
| 422 | +# | ||
| 423 | +# /:project_id/tree/*path | ||
| 424 | +# /gitlabhq/tree/master/app | ||
| 425 | +# /gitlabhq/tree/test/branch/name/app | ||
| 426 | +describe "pending routing" do | ||
| 427 | + describe "/:project_id/blame/:id" do | ||
| 428 | + it "routes to a ref with a path" do | ||
| 429 | + get("/gitlabhq/blame/master/app/models/project.rb").should route_to('blame#show', project_id: 'gitlabhq', id: 'master/app/models/project.rb') | ||
| 430 | + end | ||
| 431 | + end | ||
| 432 | + | ||
| 433 | + describe "/:project_id/blob/:id" do | ||
| 434 | + it "routes to a ref with a path" do | ||
| 435 | + get("/gitlabhq/blob/master/app/models/project.rb").should route_to('blob#show', project_id: 'gitlabhq', id: 'master/app/models/project.rb') | ||
| 436 | + end | ||
| 437 | + end | ||
| 438 | + | ||
| 439 | + describe "/:project_id/commit/:id" do | ||
| 440 | + it "routes to a specific commit" do | ||
| 441 | + get("/gitlabhq/commit/f4b1449").should route_to('commit#show', project_id: 'gitlabhq', id: 'f4b1449') | ||
| 442 | + get("/gitlabhq/commit/f4b14494ef6abf3d144c28e4af0c20143383e062").should route_to('commit#show', project_id: 'gitlabhq', id: 'f4b14494ef6abf3d144c28e4af0c20143383e062') | ||
| 443 | + end | ||
| 444 | + end | ||
| 445 | + | ||
| 446 | + describe "/:project_id/raw/:id" do | ||
| 447 | + it "routes to a ref with a path" do | ||
| 448 | + get("/gitlabhq/raw/master/app/models/project.rb").should route_to('raw#show', project_id: 'gitlabhq', id: 'master/app/models/project.rb') | ||
| 449 | + end | ||
| 450 | + end | ||
| 451 | + | ||
| 452 | + describe "/:project_id/tree/:id" do | ||
| 453 | + it "routes to a ref with a path" do | ||
| 454 | + get("/gitlabhq/tree/master/app/models/project.rb").should route_to('tree#show', project_id: 'gitlabhq', id: 'master/app/models/project.rb') | ||
| 455 | + end | ||
| 456 | + end | ||
| 457 | +end |