Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2017-09-12 11:51:34 +0300
committerBob Van Landuyt <bob@vanlanduyt.co>2017-10-04 23:49:41 +0300
commit5998157618eafb69f6980f41639a7b485fe2467f (patch)
tree1c3235903eb02e89a41f61e4695c19e3cf712de1 /spec/serializers
parent6388b8feec28b0f0ca2f9e6d9c5c7b4e404fed2f (diff)
Include `can_leave` for a group
Diffstat (limited to 'spec/serializers')
-rw-r--r--spec/serializers/group_child_entity_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/serializers/group_child_entity_spec.rb b/spec/serializers/group_child_entity_spec.rb
index 3a7d2205f53..9ddaf8f6469 100644
--- a/spec/serializers/group_child_entity_spec.rb
+++ b/spec/serializers/group_child_entity_spec.rb
@@ -83,6 +83,12 @@ describe GroupChildEntity do
end
end
+ it 'allows an owner to leave when there is another one' do
+ object.add_owner(create(:user))
+
+ expect(json[:can_leave]).to be_truthy
+ end
+
it_behaves_like 'group child json'
end
end