File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -243,6 +243,14 @@ describe('Entities API', () => {
243243
244244 describe ( 'GET /datasets/:name/entities/:uuid' , ( ) => {
245245
246+ it ( 'should strip uuid: prefix from query param in entity requests' , testEntities ( async ( service ) => {
247+ const asAlice = await service . login ( 'alice' ) ;
248+
249+ await asAlice . get ( '/v1/projects/1/datasets/people/entities/uuid:12345678-1234-4123-8234-123456789abc' )
250+ . expect ( 200 )
251+ . then ( ( { body } ) => body . uuid . should . equal ( '12345678-1234-4123-8234-123456789abc' ) ) ;
252+ } ) ) ;
253+
246254 it ( 'should return notfound if the dataset does not exist' , testEntities ( async ( service ) => {
247255 const asAlice = await service . login ( 'alice' ) ;
248256
@@ -2170,14 +2178,14 @@ describe('Entities API', () => {
21702178 it ( 'should reject if the entity has not been deleted' , testEntities ( async ( service ) => {
21712179 const asAlice = await service . login ( 'alice' ) ;
21722180
2173- await asAlice . post ( '/v1/projects/1/datasets/people/entities/uuid: 12345678-1234-4123-8234-123456789abc/restore' )
2181+ await asAlice . post ( '/v1/projects/1/datasets/people/entities/12345678-1234-4123-8234-123456789abc/restore' )
21742182 . expect ( 404 ) ;
21752183 } ) ) ;
21762184
21772185 it ( 'should reject if the entity does not exist' , testEntities ( async ( service ) => {
21782186 const asAlice = await service . login ( 'alice' ) ;
21792187
2180- await asAlice . post ( `/v1/projects/1/datasets/people/entities/uuid: ${ NONEXISTENT_ENTITY } /restore` )
2188+ await asAlice . post ( `/v1/projects/1/datasets/people/entities/${ NONEXISTENT_ENTITY } /restore` )
21812189 . expect ( 404 ) ;
21822190 } ) ) ;
21832191
You can’t perform that action at this time.
0 commit comments