summaryrefslogtreecommitdiff
path: root/spec/routing
diff options
context:
space:
mode:
authorJames Edwards-Jones <jedwardsjones@gitlab.com>2017-02-03 17:25:26 +0000
committerJames Edwards-Jones <jedwardsjones@gitlab.com>2017-02-03 17:25:26 +0000
commit1af3f3b673be8f85b37d455b101954e62c2a3add (patch)
tree56f09bef2ca41964fae3efaf4f15be7fe1640ba4 /spec/routing
parent67c8526033241f6bd190fa16622970b3919e6dbd (diff)
parentbd8f2b15b3d5267075a626ce86f3a06cc650fcbf (diff)
downloadgitlab-ce-1af3f3b673be8f85b37d455b101954e62c2a3add.tar.gz
Merge branch 'master' into jej-pages-picked-from-ee
Diffstat (limited to 'spec/routing')
-rw-r--r--spec/routing/project_routing_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/routing/project_routing_spec.rb b/spec/routing/project_routing_spec.rb
index 43be785ad9d..a5bc62ef6c2 100644
--- a/spec/routing/project_routing_spec.rb
+++ b/spec/routing/project_routing_spec.rb
@@ -2,8 +2,8 @@ require 'spec_helper'
describe 'project routing' do
before do
- allow(Project).to receive(:find_with_namespace).and_return(false)
- allow(Project).to receive(:find_with_namespace).with('gitlab/gitlabhq').and_return(true)
+ allow(Project).to receive(:find_by_full_path).and_return(false)
+ allow(Project).to receive(:find_by_full_path).with('gitlab/gitlabhq').and_return(true)
end
# Shared examples for a resource inside a Project
@@ -93,13 +93,13 @@ describe 'project routing' do
end
context 'name with dot' do
- before { allow(Project).to receive(:find_with_namespace).with('gitlab/gitlabhq.keys').and_return(true) }
+ before { allow(Project).to receive(:find_by_full_path).with('gitlab/gitlabhq.keys').and_return(true) }
it { expect(get('/gitlab/gitlabhq.keys')).to route_to('projects#show', namespace_id: 'gitlab', id: 'gitlabhq.keys') }
end
context 'with nested group' do
- before { allow(Project).to receive(:find_with_namespace).with('gitlab/subgroup/gitlabhq').and_return(true) }
+ before { allow(Project).to receive(:find_by_full_path).with('gitlab/subgroup/gitlabhq').and_return(true) }
it { expect(get('/gitlab/subgroup/gitlabhq')).to route_to('projects#show', namespace_id: 'gitlab/subgroup', id: 'gitlabhq') }
end