summaryrefslogtreecommitdiff
path: root/spec/support/api
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-06-23 17:14:31 +0200
committerRémy Coutable <remy@rymai.me>2016-08-10 19:07:05 +0200
commit29850364eccccc3ce7305f6706cea1d5d073de2e (patch)
treebbf98c0a621676b7b3f3e58b4618905923ed1454 /spec/support/api
parentb1aac0382c406b3856db90e15df8b2a9ea7ff6cd (diff)
downloadgitlab-ce-29850364eccccc3ce7305f6706cea1d5d073de2e.tar.gz
New AccessRequests API endpoints for Group & Project
Also, mutualize AccessRequests and Members endpoints for Group & Project. New API documentation for the AccessRequests endpoints. Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec/support/api')
-rw-r--r--spec/support/api/members_shared_examples.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/support/api/members_shared_examples.rb b/spec/support/api/members_shared_examples.rb
new file mode 100644
index 00000000000..dab71a35a55
--- /dev/null
+++ b/spec/support/api/members_shared_examples.rb
@@ -0,0 +1,11 @@
+shared_examples 'a 404 response when source is private' do
+ before do
+ source.update_column(:visibility_level, Gitlab::VisibilityLevel::PRIVATE)
+ end
+
+ it 'returns 404' do
+ route
+
+ expect(response).to have_http_status(404)
+ end
+end