diff --git a/config/initializers/constants.rb b/config/initializers/constants.rb index 827d16e25..22cd5aca9 100644 --- a/config/initializers/constants.rb +++ b/config/initializers/constants.rb @@ -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 diff --git a/test/fixtures/user_my_modules.yml b/test/fixtures/user_my_modules.yml index d621b5746..6a4d84a38 100644 --- a/test/fixtures/user_my_modules.yml +++ b/test/fixtures/user_my_modules.yml @@ -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 - diff --git a/test/fixtures/user_organizations.yml b/test/fixtures/user_organizations.yml index 26642288b..ab86a298d 100644 --- a/test/fixtures/user_organizations.yml +++ b/test/fixtures/user_organizations.yml @@ -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 diff --git a/test/fixtures/user_projects.yml b/test/fixtures/user_projects.yml index f2ea07074..766c730e0 100644 --- a/test/fixtures/user_projects.yml +++ b/test/fixtures/user_projects.yml @@ -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