aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/adapters/postgresql/uuid_test.rb
diff options
context:
space:
mode:
authorMatthew Draper <matthew@trebex.net>2017-07-09 07:59:44 +0930
committerGitHub <noreply@github.com>2017-07-09 07:59:44 +0930
commit650ea5e5cf50d8a7242499463cf1762922d330a8 (patch)
tree747a5a94bf3f1f98d6debf954ca0d06b6faf9c27 /activerecord/test/cases/adapters/postgresql/uuid_test.rb
parent72e1c4229ab0af6a76c1635adff76fc02fa7fe71 (diff)
parent38b041713b609d8fcd2c458804cdef8a81e567a7 (diff)
downloadrails-650ea5e5cf50d8a7242499463cf1762922d330a8.tar.gz
rails-650ea5e5cf50d8a7242499463cf1762922d330a8.tar.bz2
rails-650ea5e5cf50d8a7242499463cf1762922d330a8.zip
Merge pull request #29715 from reverbdotcom/ptd/fix-invalid-uuids
Don't allow uuids with orphan curly braces
Diffstat (limited to 'activerecord/test/cases/adapters/postgresql/uuid_test.rb')
-rw-r--r--activerecord/test/cases/adapters/postgresql/uuid_test.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/activerecord/test/cases/adapters/postgresql/uuid_test.rb b/activerecord/test/cases/adapters/postgresql/uuid_test.rb
index 8eddd81c38..00de92cdfd 100644
--- a/activerecord/test/cases/adapters/postgresql/uuid_test.rb
+++ b/activerecord/test/cases/adapters/postgresql/uuid_test.rb
@@ -124,7 +124,9 @@ class PostgresqlUUIDTest < ActiveRecord::PostgreSQLTestCase
"Z0000C99-9C0B-4EF8-BB6D-6BB9BD380A11",
"a0eebc999r0b4ef8ab6d6bb9bd380a11",
"a0ee-bc99------4ef8-bb6d-6bb9-bd38-0a11",
- "{a0eebc99-bb6d6bb9-bd380a11}"].each do |invalid_uuid|
+ "{a0eebc99-bb6d6bb9-bd380a11}",
+ "{a0eebc99-9c0b4ef8-bb6d6bb9-bd380a11",
+ "a0eebc99-9c0b4ef8-bb6d6bb9-bd380a11}"].each do |invalid_uuid|
uuid = UUIDType.new guid: invalid_uuid
assert_nil uuid.guid
end