Replaced hardcoded big values with infinity constant in fixtures.

This commit is contained in:
Matej Zrimšek 2016-10-17 13:52:33 +02:00
parent 56293ad62d
commit 1b0fb255db
4 changed files with 9 additions and 9 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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