summaryrefslogtreecommitdiff
path: root/spec/routing
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2016-10-07 16:49:48 +0100
committerSean McGivern <sean@gitlab.com>2016-10-11 13:31:12 +0100
commit1022456bb15d18b05c14fe344950fb75c7c69f48 (patch)
treeaace3fadc569905719232d73811739961450c22e /spec/routing
parent8581df3bfb9e847d07a585a22cfa21658ae40ea2 (diff)
downloadgitlab-ce-1022456bb15d18b05c14fe344950fb75c7c69f48.tar.gz
Allow browsing branches that end with '.atom'
We need to do two things to support this: 1. Simplify the regex capture in the routing for the CommitsController to not exclude the '.atom' suffix. That's a perfectly valid git branch name, so we shouldn't blow up if we get it. 2. Because Rails now can't automatically detect the request format, add some code to do so in `ExtractPath` when there is no path. This means that, given branches 'foo' and 'foo.atom', the Atom feed for the former is unroutable. To fix this: don't do that! Give the branches different names!
Diffstat (limited to 'spec/routing')
-rw-r--r--spec/routing/project_routing_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/routing/project_routing_spec.rb b/spec/routing/project_routing_spec.rb
index 77842057a10..2322430d212 100644
--- a/spec/routing/project_routing_spec.rb
+++ b/spec/routing/project_routing_spec.rb
@@ -337,7 +337,7 @@ describe Projects::CommitsController, 'routing' do
end
it 'to #show' do
- expect(get('/gitlab/gitlabhq/commits/master.atom')).to route_to('projects/commits#show', namespace_id: 'gitlab', project_id: 'gitlabhq', id: 'master', format: 'atom')
+ expect(get('/gitlab/gitlabhq/commits/master.atom')).to route_to('projects/commits#show', namespace_id: 'gitlab', project_id: 'gitlabhq', id: 'master.atom')
end
end