Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2012-09-17 21:36:13 +0400
committerRobert Speicher <rspeicher@gmail.com>2012-09-27 00:32:22 +0400
commit39c657930625ddc3ac8a921f01ffc83acadce68f (patch)
treeec6edde522d2fc1a1673d221e1d18c7a14a6e5c2 /spec
parent37f0b600bc9a994136791e6838b3228c56f909b2 (diff)
Add BlameController, remove Refs#blame action
Diffstat (limited to 'spec')
-rw-r--r--spec/requests/gitlab_flavored_markdown_spec.rb2
-rw-r--r--spec/routing/project_routing_spec.rb17
2 files changed, 8 insertions, 11 deletions
diff --git a/spec/requests/gitlab_flavored_markdown_spec.rb b/spec/requests/gitlab_flavored_markdown_spec.rb
index db3f89cbe9b..2e5d4209315 100644
--- a/spec/requests/gitlab_flavored_markdown_spec.rb
+++ b/spec/requests/gitlab_flavored_markdown_spec.rb
@@ -69,7 +69,7 @@ describe "Gitlab Flavored Markdown" do
end
it "should render title in refs#blame" do
- visit blame_file_project_ref_path(project, id: @branch_name, path: @test_file)
+ visit blame_file_project_ref_path(project, File.join(@branch_name, @test_file))
within(".blame_commit") do
page.should have_link("##{issue.id}")
diff --git a/spec/routing/project_routing_spec.rb b/spec/routing/project_routing_spec.rb
index f9c99a209fc..303df02c08b 100644
--- a/spec/routing/project_routing_spec.rb
+++ b/spec/routing/project_routing_spec.rb
@@ -195,7 +195,6 @@ end
# 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
-# blame_file_project_ref GET /:project_id/:id/blame/:path(.:format) refs#blame
describe RefsController, "routing" do
it "to #switch" do
get("/gitlabhq/switch").should route_to('refs#switch', project_id: 'gitlabhq')
@@ -209,10 +208,6 @@ describe RefsController, "routing" do
it "to #blob" do
get("/gitlabhq/stable/blob").should route_to('refs#blob', project_id: 'gitlabhq', id: 'stable')
end
-
- it "to #blame" do
- get("/gitlabhq/stable/blame/foo/bar/baz").should route_to('refs#blame', project_id: 'gitlabhq', id: 'stable', path: 'foo/bar/baz')
- end
end
# diffs_project_merge_request GET /:project_id/merge_requests/:id/diffs(.:format) merge_requests#diffs
@@ -399,6 +394,12 @@ describe NotesController, "routing" do
end
end
+describe BlameController, "routing" do
+ it "to #show" do
+ get("/gitlabhq/blame/master/app/models/project.rb").should route_to('blame#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')
@@ -432,11 +433,7 @@ end
# /gitlabhq/tree/master/app
# /gitlabhq/tree/test/branch/name/app
describe "pending routing" do
- describe "/:project_id/blame/:id" do
- it "routes to a ref with a path" do
- get("/gitlabhq/blame/master/app/models/project.rb").should route_to('blame#show', project_id: 'gitlabhq', id: 'master/app/models/project.rb')
- end
- end
+ before { pending }
describe "/:project_id/blob/:id" do
it "routes to a ref with a path" do