summaryrefslogtreecommitdiff
path: root/spec/lib/constraints/group_url_constrainer_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/constraints/group_url_constrainer_spec.rb')
-rw-r--r--spec/lib/constraints/group_url_constrainer_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/lib/constraints/group_url_constrainer_spec.rb b/spec/lib/constraints/group_url_constrainer_spec.rb
index 892554f2870..96dacdc5cd2 100644
--- a/spec/lib/constraints/group_url_constrainer_spec.rb
+++ b/spec/lib/constraints/group_url_constrainer_spec.rb
@@ -10,6 +10,13 @@ describe GroupUrlConstrainer, lib: true do
it { expect(subject.matches?(request)).to be_truthy }
end
+ context 'valid request for nested group' do
+ let!(:nested_group) { create(:group, path: 'nested', parent: group) }
+ let!(:request) { build_request('gitlab/nested') }
+
+ it { expect(subject.matches?(request)).to be_truthy }
+ end
+
context 'invalid request' do
let(:request) { build_request('foo') }