Deterministic fixture UUIDs
This commit is contained in:
committed by
Mike Dalessio
parent
1959e15f7e
commit
63f8a9af78
+3
-2
@@ -80,8 +80,9 @@ module FixturesTestHelper
|
||||
label = label.to_s.delete_suffix("_uuid")
|
||||
end
|
||||
|
||||
return super(label, column_type) unless column_type == :uuid
|
||||
UuidPrimaryKey.uuid_to_base36(super(label, column_type))
|
||||
# Rails passes :string for varchar columns, so handle both :uuid and :string
|
||||
return super(label, column_type) unless column_type.in?([:uuid, :string])
|
||||
UuidPrimaryKey.generate_fixture_uuid(label)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user