summaryrefslogtreecommitdiff
path: root/spec/models/group_spec.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2017-01-24 15:40:01 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2017-01-24 17:44:21 +0200
commit0d9e80c3ddedb5b56165dffa6cb248ee49091abf (patch)
treea447cc9307fdb8300c58ee066d5afef1812e242a /spec/models/group_spec.rb
parenta89aab9c630593524b8a210746d2eb680ac5d102 (diff)
downloadgitlab-ce-0d9e80c3ddedb5b56165dffa6cb248ee49091abf.tar.gz
Fix 500 error for Group#web_url method if nested groupdz-fix-group-canonical-route
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'spec/models/group_spec.rb')
-rw-r--r--spec/models/group_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/models/group_spec.rb b/spec/models/group_spec.rb
index 45fe927202b..63ffdf70958 100644
--- a/spec/models/group_spec.rb
+++ b/spec/models/group_spec.rb
@@ -269,6 +269,12 @@ describe Group, models: true do
it 'returns the canonical URL' do
expect(group.web_url).to include("groups/#{group.name}")
end
+
+ context 'nested group' do
+ let(:nested_group) { create(:group, :nested) }
+
+ it { expect(nested_group.web_url).to include("groups/#{nested_group.full_path}") }
+ end
end
describe 'nested group' do