mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-25 05:27:33 +08:00
Replaced hardcoded big values with infinity constant in fixtures.
This commit is contained in:
parent
56293ad62d
commit
1b0fb255db
4 changed files with 9 additions and 9 deletions
|
|
@ -23,8 +23,9 @@ class Constants
|
|||
PASSWORD_STRETCH_FACTOR = 10
|
||||
# Standard max length for email
|
||||
EMAIL_MAX_LENGTH = 254
|
||||
# Some big value which is still supported by all databases
|
||||
INFINITY = 999999999999999999
|
||||
# Some big value which is still supported by all databases, no matter what
|
||||
# data type is used
|
||||
INFINITY = 2**32 / 2 - 1
|
||||
|
||||
#=============================================================================
|
||||
# Query/display limits
|
||||
|
|
|
|||
5
test/fixtures/user_my_modules.yml
vendored
5
test/fixtures/user_my_modules.yml
vendored
|
|
@ -24,13 +24,13 @@ five:
|
|||
assigned_by: steve
|
||||
|
||||
non_existing_user:
|
||||
user_id: 99999
|
||||
user_id: <%= Constants::INFINITY %>
|
||||
my_module: rna_test
|
||||
assigned_by: jlaw
|
||||
|
||||
non_existing_module:
|
||||
user_id: jlaw
|
||||
my_module_id: 99999
|
||||
my_module_id: <%= Constants::INFINITY %>
|
||||
assigned_by: jlaw
|
||||
|
||||
without_user:
|
||||
|
|
@ -45,4 +45,3 @@ without_module:
|
|||
archived:
|
||||
user: steve
|
||||
my_module: archived
|
||||
|
||||
|
|
|
|||
4
test/fixtures/user_organizations.yml
vendored
4
test/fixtures/user_organizations.yml
vendored
|
|
@ -86,13 +86,13 @@ without_organization:
|
|||
assigned_by: steve
|
||||
|
||||
with_invalid_user:
|
||||
user_id: 9999999
|
||||
user_id: <%= Constants::INFINITY %>
|
||||
organization: nib
|
||||
role: 1
|
||||
assigned_by: steve
|
||||
|
||||
with_invalid_organization:
|
||||
user: nora
|
||||
organization_id: 999999
|
||||
organization_id: <%= Constants::INFINITY %>
|
||||
role: 1
|
||||
assigned_by: steve
|
||||
|
|
|
|||
4
test/fixtures/user_projects.yml
vendored
4
test/fixtures/user_projects.yml
vendored
|
|
@ -107,13 +107,13 @@ without_project:
|
|||
assigned_by: steve
|
||||
|
||||
with_invalid_user:
|
||||
user_id: 9999999
|
||||
user_id: <%= Constants::INFINITY %>
|
||||
project: decathlon
|
||||
role: 1
|
||||
assigned_by: steve
|
||||
|
||||
with_invalid_project:
|
||||
user: nora
|
||||
project_id: 999999
|
||||
project_id: <%= Constants::INFINITY %>
|
||||
role: 1
|
||||
assigned_by: steve
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue