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:
Diffstat (limited to 'spec/requests/api/namespaces_spec.rb')
-rw-r--r--spec/requests/api/namespaces_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/requests/api/namespaces_spec.rb b/spec/requests/api/namespaces_spec.rb
index 09b87f41b82..ab39c29653f 100644
--- a/spec/requests/api/namespaces_spec.rb
+++ b/spec/requests/api/namespaces_spec.rb
@@ -285,6 +285,14 @@ RSpec.describe API::Namespaces do
end
context 'when authenticated' do
+ it_behaves_like 'rate limited endpoint', rate_limit_key: :namespace_exists do
+ let(:current_user) { user }
+
+ def request
+ get api("/namespaces/#{namespace1.path}/exists", current_user)
+ end
+ end
+
it 'returns JSON indicating the namespace exists and a suggestion' do
get api("/namespaces/#{namespace1.path}/exists", user)