Add BlobController, remove Refs#blob

This commit is contained in:
Robert Speicher 2012-09-17 13:49:57 -04:00
parent 39c6579306
commit 576cec6c67
8 changed files with 83 additions and 65 deletions

View file

@ -192,7 +192,6 @@ describe ProtectedBranchesController, "routing" do
end
# switch_project_refs GET /:project_id/switch(.:format) refs#switch
# blob_project_ref GET /:project_id/:id/blob(.:format) refs#blob
# logs_tree_project_ref GET /:project_id/:id/logs_tree(.:format) refs#logs_tree
# logs_file_project_ref GET /:project_id/:id/logs_tree/:path(.:format) refs#logs_tree
describe RefsController, "routing" do
@ -204,10 +203,6 @@ describe RefsController, "routing" do
get("/gitlabhq/stable/logs_tree").should route_to('refs#logs_tree', project_id: 'gitlabhq', id: 'stable')
get("/gitlabhq/stable/logs_tree/foo/bar/baz").should route_to('refs#logs_tree', project_id: 'gitlabhq', id: 'stable', path: 'foo/bar/baz')
end
it "to #blob" do
get("/gitlabhq/stable/blob").should route_to('refs#blob', project_id: 'gitlabhq', id: 'stable')
end
end
# diffs_project_merge_request GET /:project_id/merge_requests/:id/diffs(.:format) merge_requests#diffs
@ -400,6 +395,12 @@ describe BlameController, "routing" do
end
end
describe BlobController, "routing" do
it "to #show" do
get("/gitlabhq/blob/master/app/models/project.rb").should route_to('blob#show', project_id: 'gitlabhq', id: 'master/app/models/project.rb')
end
end
describe TreeController, "routing" do
it "to #show" do
get("/gitlabhq/tree/master/app/models/project.rb").should route_to('tree#show', project_id: 'gitlabhq', id: 'master/app/models/project.rb')
@ -435,12 +436,6 @@ end
describe "pending routing" do
before { pending }
describe "/:project_id/blob/:id" do
it "routes to a ref with a path" do
get("/gitlabhq/blob/master/app/models/project.rb").should route_to('blob#show', project_id: 'gitlabhq', id: 'master/app/models/project.rb')
end
end
describe "/:project_id/commit/:id" do
it "routes to a specific commit" do
get("/gitlabhq/commit/f4b1449").should route_to('commit#show', project_id: 'gitlabhq', id: 'f4b1449')