summaryrefslogtreecommitdiff
path: root/spec/routing
diff options
context:
space:
mode:
authorAdam Pahlevi <adam.pahlevi@gmail.com>2017-02-03 06:43:19 +0700
committerAdam Pahlevi <adam.pahlevi@gmail.com>2017-02-03 07:14:04 +0700
commita0586dbc165cc09422412149712a218938137308 (patch)
tree1918196171212c48a28bb4e28b6b0fed5f3ad2f2 /spec/routing
parentd777e6f1da98be64b872a2bea2222f3e037a3d4d (diff)
downloadgitlab-ce-a0586dbc165cc09422412149712a218938137308.tar.gz
replace `find_with_namespace` with `find_by_full_path`
add complete changelog for !8949
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 77549db2927..96889abee79 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
@@ -86,13 +86,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