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:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-10-18 06:10:30 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-10-18 06:10:30 +0300
commit14facaa466ed56cd0dfad8c0f821ea32f94f94a0 (patch)
tree16f08c5a5d8e1241871a5c4f7398a0e2f0aab445 /spec/lib/api
parent90e7f31698f6d67da00ed3a68a7392127746ced2 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/api')
-rw-r--r--spec/lib/api/helpers_spec.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/spec/lib/api/helpers_spec.rb b/spec/lib/api/helpers_spec.rb
index 3ea42c29ce2..11bbe825402 100644
--- a/spec/lib/api/helpers_spec.rb
+++ b/spec/lib/api/helpers_spec.rb
@@ -110,6 +110,13 @@ RSpec.describe API::Helpers do
end
end
+ context 'when ID is a negative number' do
+ let(:existing_id) { project.id }
+ let(:non_existing_id) { -1 }
+
+ it_behaves_like 'project finder'
+ end
+
context 'when project is pending delete' do
let(:project_pending_delete) { create(:project, pending_delete: true) }
@@ -325,6 +332,13 @@ RSpec.describe API::Helpers do
it_behaves_like 'group finder'
end
+
+ context 'when ID is a negative number' do
+ let(:existing_id) { group.id }
+ let(:non_existing_id) { -1 }
+
+ it_behaves_like 'group finder'
+ end
end
end
@@ -421,6 +435,13 @@ RSpec.describe API::Helpers do
it_behaves_like 'namespace finder'
end
+
+ context 'when ID is a negative number' do
+ let(:existing_id) { namespace.id }
+ let(:non_existing_id) { -1 }
+
+ it_behaves_like 'namespace finder'
+ end
end
shared_examples 'user namespace finder' do