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>2020-04-01 18:07:45 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-01 18:07:45 +0300
commit1219a9dce91f4edbc135dfc08299b4122b4825a8 (patch)
treee7d12a55d75a2d56e60d9527bef3724e3578866d /spec/support/non_existing_records_helper.rb
parent1a0d6dbdc2ac3047f4953a359ef27ba6e26074ae (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support/non_existing_records_helper.rb')
-rw-r--r--spec/support/non_existing_records_helper.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/support/non_existing_records_helper.rb b/spec/support/non_existing_records_helper.rb
new file mode 100644
index 00000000000..1d4368c8ddf
--- /dev/null
+++ b/spec/support/non_existing_records_helper.rb
@@ -0,0 +1,12 @@
+# frozen_string_literal: true
+
+module NonExistingRecordsHelpers
+ # Max value for PG `serial` type: https://www.postgresql.org/docs/12/datatype-numeric.html
+ ACTIVE_MODEL_INTEGER_MAX = 2147483647
+
+ def non_existing_record_id
+ ACTIVE_MODEL_INTEGER_MAX
+ end
+ alias_method :non_existing_record_iid, :non_existing_record_id
+ alias_method :non_existing_record_access_level, :non_existing_record_id
+end