From d618d010d7f37f5ce1e573afa5fba85d7d18da87 Mon Sep 17 00:00:00 2001 From: Jarka Kadlecova Date: Wed, 22 Mar 2017 12:17:01 +0100 Subject: [PATCH] =?UTF-8?q?Add=20spec=20that=20tests=20=E2=80=98LIKE?= =?UTF-8?q?=E2=80=99=20query=20for=20routes=20with=20=5F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spec/models/namespace_spec.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spec/models/namespace_spec.rb b/spec/models/namespace_spec.rb index 757f3921450..67d48557184 100644 --- a/spec/models/namespace_spec.rb +++ b/spec/models/namespace_spec.rb @@ -215,10 +215,12 @@ describe Namespace, models: true do end describe '#descendants' do - let!(:group) { create(:group) } + let!(:group) { create(:group, path: 'git_lab') } let!(:nested_group) { create(:group, parent: group) } let!(:deep_nested_group) { create(:group, parent: nested_group) } let!(:very_deep_nested_group) { create(:group, parent: deep_nested_group) } + let!(:another_group) { create(:group, path: 'gitllab') } + let!(:another_group_nested) { create(:group, path: 'foo', parent: another_group) } it 'returns the correct descendants' do expect(very_deep_nested_group.descendants.to_a).to eq([])