diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-10-07 16:39:57 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-10-10 16:32:32 +0300 |
commit | d6cfc0042ed2ce9a33f31a6c44661c136e861b98 (patch) | |
tree | d96cc71bbe74bfc25c810f3680ee8a8ad2364681 /spec/routing | |
parent | 68ab7047dae98172a0bd8b92956f2ee51b9167a0 (diff) | |
download | gitlab-ce-d6cfc0042ed2ce9a33f31a6c44661c136e861b98.tar.gz |
Catch any undefined API routing and return 400 Bad Request
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'spec/routing')
-rw-r--r-- | spec/routing/routing_spec.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/routing/routing_spec.rb b/spec/routing/routing_spec.rb index 0dd00af878d..0ee1c811dfb 100644 --- a/spec/routing/routing_spec.rb +++ b/spec/routing/routing_spec.rb @@ -266,7 +266,9 @@ describe "Groups", "routing" do end it "also display group#show on the short path" do - expect(get('/1')).to route_to('namespaces#show', id: '1') + allow(Group).to receive(:find_by_path).and_return(true) + + expect(get('/1')).to route_to('groups#show', id: '1') end end |