summaryrefslogtreecommitdiff
path: root/spec/models/group_spec.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-12-07 19:16:17 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-12-11 10:30:40 +0200
commitd7010fdcd7c73c32c71cc4c635472014597cee81 (patch)
treea848d3f4a5562e9acc72f89d4a1d20c762b8edbe /spec/models/group_spec.rb
parentb552a4eb18ad1f3e8b9c0a4e56898a36d3d9d8de (diff)
downloadgitlab-ce-d7010fdcd7c73c32c71cc4c635472014597cee81.tar.gz
Create nested group factory
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'spec/models/group_spec.rb')
-rw-r--r--spec/models/group_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/models/group_spec.rb b/spec/models/group_spec.rb
index 1613a586a2c..850b1a3cf1e 100644
--- a/spec/models/group_spec.rb
+++ b/spec/models/group_spec.rb
@@ -271,4 +271,11 @@ describe Group, models: true do
expect(group.web_url).to include("groups/#{group.name}")
end
end
+
+ describe 'nested group' do
+ subject { create(:group, :nested) }
+
+ it { is_expected.to be_valid }
+ it { expect(subject.parent).to be_kind_of(Group) }
+ end
end