From dd68e37db36de31da256be0f9167469b9918a909 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 9 Oct 2013 19:03:09 +0300 Subject: Fix profile specs --- spec/routing/routing_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'spec/routing') diff --git a/spec/routing/routing_spec.rb b/spec/routing/routing_spec.rb index 946ef7c28cb..1b1d19d26b1 100644 --- a/spec/routing/routing_spec.rb +++ b/spec/routing/routing_spec.rb @@ -128,7 +128,7 @@ end # profile_update PUT /profile/update(.:format) profile#update describe ProfilesController, "routing" do it "to #account" do - get("/profile/account").should route_to('profiles#account') + get("/profile/account").should route_to('profiles/accounts#show') end it "to #history" do -- cgit v1.2.3 From 05c988419f438ec72556f3a52227c62943c67845 Mon Sep 17 00:00:00 2001 From: Peter Fern Date: Mon, 2 Sep 2013 20:48:32 +1000 Subject: Expand refs constraints to include valid characters Fixes #4831, #4865, #4932 --- spec/routing/project_routing_spec.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'spec/routing') diff --git a/spec/routing/project_routing_spec.rb b/spec/routing/project_routing_spec.rb index 20c04e94c24..5597f08d186 100644 --- a/spec/routing/project_routing_spec.rb +++ b/spec/routing/project_routing_spec.rb @@ -138,12 +138,24 @@ end describe Projects::BranchesController, "routing" do it "to #branches" do get("/gitlab/gitlabhq/branches").should route_to('projects/branches#index', project_id: 'gitlab/gitlabhq') + delete("/gitlab/gitlabhq/branches/feature%2345").should route_to('projects/branches#destroy', project_id: 'gitlab/gitlabhq', id: 'feature#45') + delete("/gitlab/gitlabhq/branches/feature%2B45").should route_to('projects/branches#destroy', project_id: 'gitlab/gitlabhq', id: 'feature+45') + delete("/gitlab/gitlabhq/branches/feature@45").should route_to('projects/branches#destroy', project_id: 'gitlab/gitlabhq', id: 'feature@45') + delete("/gitlab/gitlabhq/branches/feature%2345/foo/bar/baz").should route_to('projects/branches#destroy', project_id: 'gitlab/gitlabhq', id: 'feature#45/foo/bar/baz') + delete("/gitlab/gitlabhq/branches/feature%2B45/foo/bar/baz").should route_to('projects/branches#destroy', project_id: 'gitlab/gitlabhq', id: 'feature+45/foo/bar/baz') + delete("/gitlab/gitlabhq/branches/feature@45/foo/bar/baz").should route_to('projects/branches#destroy', project_id: 'gitlab/gitlabhq', id: 'feature@45/foo/bar/baz') end end describe Projects::TagsController, "routing" do it "to #tags" do get("/gitlab/gitlabhq/tags").should route_to('projects/tags#index', project_id: 'gitlab/gitlabhq') + delete("/gitlab/gitlabhq/tags/feature%2345").should route_to('projects/tags#destroy', project_id: 'gitlab/gitlabhq', id: 'feature#45') + delete("/gitlab/gitlabhq/tags/feature%2B45").should route_to('projects/tags#destroy', project_id: 'gitlab/gitlabhq', id: 'feature+45') + delete("/gitlab/gitlabhq/tags/feature@45").should route_to('projects/tags#destroy', project_id: 'gitlab/gitlabhq', id: 'feature@45') + delete("/gitlab/gitlabhq/tags/feature%2345/foo/bar/baz").should route_to('projects/tags#destroy', project_id: 'gitlab/gitlabhq', id: 'feature#45/foo/bar/baz') + delete("/gitlab/gitlabhq/tags/feature%2B45/foo/bar/baz").should route_to('projects/tags#destroy', project_id: 'gitlab/gitlabhq', id: 'feature+45/foo/bar/baz') + delete("/gitlab/gitlabhq/tags/feature@45/foo/bar/baz").should route_to('projects/tags#destroy', project_id: 'gitlab/gitlabhq', id: 'feature@45/foo/bar/baz') end end @@ -183,9 +195,11 @@ describe Projects::RefsController, "routing" do get("/gitlab/gitlabhq/refs/stable/logs_tree").should route_to('projects/refs#logs_tree', project_id: 'gitlab/gitlabhq', id: 'stable') get("/gitlab/gitlabhq/refs/feature%2345/logs_tree").should route_to('projects/refs#logs_tree', project_id: 'gitlab/gitlabhq', id: 'feature#45') get("/gitlab/gitlabhq/refs/feature%2B45/logs_tree").should route_to('projects/refs#logs_tree', project_id: 'gitlab/gitlabhq', id: 'feature+45') + get("/gitlab/gitlabhq/refs/feature@45/logs_tree").should route_to('projects/refs#logs_tree', project_id: 'gitlab/gitlabhq', id: 'feature@45') get("/gitlab/gitlabhq/refs/stable/logs_tree/foo/bar/baz").should route_to('projects/refs#logs_tree', project_id: 'gitlab/gitlabhq', id: 'stable', path: 'foo/bar/baz') get("/gitlab/gitlabhq/refs/feature%2345/logs_tree/foo/bar/baz").should route_to('projects/refs#logs_tree', project_id: 'gitlab/gitlabhq', id: 'feature#45', path: 'foo/bar/baz') get("/gitlab/gitlabhq/refs/feature%2B45/logs_tree/foo/bar/baz").should route_to('projects/refs#logs_tree', project_id: 'gitlab/gitlabhq', id: 'feature+45', path: 'foo/bar/baz') + get("/gitlab/gitlabhq/refs/feature@45/logs_tree/foo/bar/baz").should route_to('projects/refs#logs_tree', project_id: 'gitlab/gitlabhq', id: 'feature@45', path: 'foo/bar/baz') get("/gitlab/gitlabhq/refs/stable/logs_tree/files.scss").should route_to('projects/refs#logs_tree', project_id: 'gitlab/gitlabhq', id: 'stable', path: 'files.scss') end end -- cgit v1.2.3 From b08608b261f8c9c552d8957b6231c7725b9529ac Mon Sep 17 00:00:00 2001 From: Drew Blessing Date: Mon, 2 Dec 2013 12:03:07 -0600 Subject: Issue 5716 - Allow removal of avatar Add class and style Add spinach tests Add entry to CHANGELOG Add entry to CHANGELOG --- spec/routing/routing_spec.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'spec/routing') diff --git a/spec/routing/routing_spec.rb b/spec/routing/routing_spec.rb index 1b1d19d26b1..1af052d8739 100644 --- a/spec/routing/routing_spec.rb +++ b/spec/routing/routing_spec.rb @@ -185,6 +185,13 @@ describe Profiles::KeysController, "routing" do end end +# profile_avatar DELETE /profile/avatar(.:format) profiles/avatars#destroy +describe Profiles::AvatarsController, "routing" do + it "to #destroy" do + delete("/profile/avatar").should route_to('profiles/avatars#destroy') + end +end + # dashboard GET /dashboard(.:format) dashboard#show # dashboard_issues GET /dashboard/issues(.:format) dashboard#issues # dashboard_merge_requests GET /dashboard/merge_requests(.:format) dashboard#merge_requests -- cgit v1.2.3 From 7cc25205410efc6b20b11d94ab2cbc1a322ff816 Mon Sep 17 00:00:00 2001 From: Jason Hollingsworth Date: Fri, 20 Dec 2013 13:12:44 -0600 Subject: Add support for various archive formats. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Used mime-types gem instead of hardcoding content types. Allow multiple extensions in archive route (.tar.gz, .tar.bz2). Change content disposition from infile(?) to attachment for api. Fixed api would return “archive” instead of {project}-{hash}.{ext} --- spec/routing/project_routing_spec.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'spec/routing') diff --git a/spec/routing/project_routing_spec.rb b/spec/routing/project_routing_spec.rb index 5597f08d186..97f7392e50a 100644 --- a/spec/routing/project_routing_spec.rb +++ b/spec/routing/project_routing_spec.rb @@ -130,6 +130,14 @@ describe Projects::RepositoriesController, "routing" do get("/gitlab/gitlabhq/repository/archive").should route_to('projects/repositories#archive', project_id: 'gitlab/gitlabhq') end + it "to #archive format:zip" do + get("/gitlab/gitlabhq/repository/archive.zip").should route_to('projects/repositories#archive', project_id: 'gitlab/gitlabhq', format: 'zip') + end + + it "to #archive format:tar.bz2" do + get("/gitlab/gitlabhq/repository/archive.tar.bz2").should route_to('projects/repositories#archive', project_id: 'gitlab/gitlabhq', format: 'tar.bz2') + end + it "to #show" do get("/gitlab/gitlabhq/repository").should route_to('projects/repositories#show', project_id: 'gitlab/gitlabhq') end -- cgit v1.2.3 From 71c157e43b8bc2adfb2a01ee7cbad0baa5bd98bd Mon Sep 17 00:00:00 2001 From: Jason Hollingsworth Date: Fri, 24 Jan 2014 20:06:44 -0600 Subject: Add files to path blacklist. Remove empty ErrorsController --- spec/routing/routing_spec.rb | 7 ------- 1 file changed, 7 deletions(-) (limited to 'spec/routing') diff --git a/spec/routing/routing_spec.rb b/spec/routing/routing_spec.rb index 1af052d8739..bcbf37e2eeb 100644 --- a/spec/routing/routing_spec.rb +++ b/spec/routing/routing_spec.rb @@ -111,13 +111,6 @@ describe HelpController, "routing" do end end -# errors_githost GET /errors/githost(.:format) errors#githost -describe ErrorsController, "routing" do - it "to #githost" do - get("/errors/githost").should route_to('errors#githost') - end -end - # profile_account GET /profile/account(.:format) profile#account # profile_history GET /profile/history(.:format) profile#history # profile_password PUT /profile/password(.:format) profile#password_update -- cgit v1.2.3