@@ -41,7 +41,7 @@ class GlobalIDCreationTest < ActiveSupport::TestCase
4141 setup do
4242 @uuid = '7ef9b614-353c-43a1-a203-ab2307851990'
4343 @person_gid = GlobalID . create ( Person . new ( 5 ) )
44- @person_uuid_gid = GlobalID . create ( Person . new ( @uuid ) )
44+ @person_uuid_gid = GlobalID . create ( PersonUuid . new ( @uuid ) )
4545 @person_namespaced_gid = GlobalID . create ( Person ::Child . new ( 4 ) )
4646 @person_model_gid = GlobalID . create ( PersonModel . new ( id : 1 ) )
4747 @cpk_model_gid = GlobalID . create ( CompositePrimaryKeyModel . new ( id : [ "tenant-key-value" , "id-value" ] ) )
@@ -136,7 +136,7 @@ class GlobalIDCreationTest < ActiveSupport::TestCase
136136
137137 test 'as string' do
138138 assert_equal 'gid://bcx/Person/5' , @person_gid . to_s
139- assert_equal "gid://bcx/Person /#{ @uuid } " , @person_uuid_gid . to_s
139+ assert_equal "gid://bcx/PersonUuid /#{ @uuid } " , @person_uuid_gid . to_s
140140 assert_equal 'gid://bcx/Person::Child/4' , @person_namespaced_gid . to_s
141141 assert_equal 'gid://bcx/PersonModel/1' , @person_model_gid . to_s
142142 assert_equal 'gid://bcx/CompositePrimaryKeyModel/tenant-key-value/id-value' , @cpk_model_gid . to_s
@@ -146,8 +146,8 @@ class GlobalIDCreationTest < ActiveSupport::TestCase
146146 assert_equal 'Z2lkOi8vYmN4L1BlcnNvbi81' , @person_gid . to_param
147147 assert_equal @person_gid , GlobalID . parse ( 'Z2lkOi8vYmN4L1BlcnNvbi81' )
148148
149- assert_equal 'Z2lkOi8vYmN4L1BlcnNvbi83ZWY5YjYxNC0zNTNjLTQzYTEtYTIwMy1hYjIzMDc4NTE5OTA ' , @person_uuid_gid . to_param
150- assert_equal @person_uuid_gid , GlobalID . parse ( 'Z2lkOi8vYmN4L1BlcnNvbi83ZWY5YjYxNC0zNTNjLTQzYTEtYTIwMy1hYjIzMDc4NTE5OTA ' )
149+ assert_equal 'Z2lkOi8vYmN4L1BlcnNvblV1aWQvN2VmOWI2MTQtMzUzYy00M2ExLWEyMDMtYWIyMzA3ODUxOTkw ' , @person_uuid_gid . to_param
150+ assert_equal @person_uuid_gid , GlobalID . parse ( 'Z2lkOi8vYmN4L1BlcnNvblV1aWQvN2VmOWI2MTQtMzUzYy00M2ExLWEyMDMtYWIyMzA3ODUxOTkw ' )
151151
152152 assert_equal 'Z2lkOi8vYmN4L1BlcnNvbjo6Q2hpbGQvNA' , @person_namespaced_gid . to_param
153153 assert_equal @person_namespaced_gid , GlobalID . parse ( 'Z2lkOi8vYmN4L1BlcnNvbjo6Q2hpbGQvNA' )
@@ -162,7 +162,7 @@ class GlobalIDCreationTest < ActiveSupport::TestCase
162162
163163 test 'as URI' do
164164 assert_equal URI ( 'gid://bcx/Person/5' ) , @person_gid . uri
165- assert_equal URI ( "gid://bcx/Person /#{ @uuid } " ) , @person_uuid_gid . uri
165+ assert_equal URI ( "gid://bcx/PersonUuid /#{ @uuid } " ) , @person_uuid_gid . uri
166166 assert_equal URI ( 'gid://bcx/Person::Child/4' ) , @person_namespaced_gid . uri
167167 assert_equal URI ( 'gid://bcx/PersonModel/1' ) , @person_model_gid . uri
168168 assert_equal URI ( 'gid://bcx/CompositePrimaryKeyModel/tenant-key-value/id-value' ) , @cpk_model_gid . uri
@@ -172,8 +172,8 @@ class GlobalIDCreationTest < ActiveSupport::TestCase
172172 assert_equal 'gid://bcx/Person/5' , @person_gid . as_json
173173 assert_equal '"gid://bcx/Person/5"' , @person_gid . to_json
174174
175- assert_equal "gid://bcx/Person /#{ @uuid } " , @person_uuid_gid . as_json
176- assert_equal "\" gid://bcx/Person /#{ @uuid } \" " , @person_uuid_gid . to_json
175+ assert_equal "gid://bcx/PersonUuid /#{ @uuid } " , @person_uuid_gid . as_json
176+ assert_equal "\" gid://bcx/PersonUuid /#{ @uuid } \" " , @person_uuid_gid . to_json
177177
178178 assert_equal 'gid://bcx/Person::Child/4' , @person_namespaced_gid . as_json
179179 assert_equal '"gid://bcx/Person::Child/4"' , @person_namespaced_gid . to_json
@@ -195,15 +195,15 @@ class GlobalIDCreationTest < ActiveSupport::TestCase
195195
196196 test 'model name' do
197197 assert_equal 'Person' , @person_gid . model_name
198- assert_equal 'Person ' , @person_uuid_gid . model_name
198+ assert_equal 'PersonUuid ' , @person_uuid_gid . model_name
199199 assert_equal 'Person::Child' , @person_namespaced_gid . model_name
200200 assert_equal 'PersonModel' , @person_model_gid . model_name
201201 assert_equal 'CompositePrimaryKeyModel' , @cpk_model_gid . model_name
202202 end
203203
204204 test 'model class' do
205205 assert_equal Person , @person_gid . model_class
206- assert_equal Person , @person_uuid_gid . model_class
206+ assert_equal PersonUuid , @person_uuid_gid . model_class
207207 assert_equal Person ::Child , @person_namespaced_gid . model_class
208208 assert_equal PersonModel , @person_model_gid . model_class
209209 assert_equal CompositePrimaryKeyModel , @cpk_model_gid . model_class
0 commit comments